Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Unified Diff: base/memory/malloc_statistics.h

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Add malloc_statistics Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/memory/malloc_statistics.h
diff --git a/base/memory/malloc_statistics.h b/base/memory/malloc_statistics.h
new file mode 100644
index 0000000000000000000000000000000000000000..bcf712a5cbf715121181050a6a5595c27cc8226d
--- /dev/null
+++ b/base/memory/malloc_statistics.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MEMORY_MALLOC_STATISTICS_H_
+#define BASE_MEMORY_MALLOC_STATISTICS_H_
+
+#include <stddef.h>
+
+#include "base/base_export.h"
+
+namespace base {
+namespace memory {
+
+struct BASE_EXPORT MallocStatistics {
+ size_t allocated_objects_size;
+ size_t allocated_objects_count;
+ size_t metadata_fragmentation_caches;
+ size_t total_virtual_size;
+ size_t resident_size;
+
+ MallocStatistics()
+ : allocated_objects_size(0),
+ allocated_objects_count(0),
+ metadata_fragmentation_caches(0),
+ total_virtual_size(0),
+ resident_size(0) {}
+
+ static MallocStatistics GetStatistics();
+};
+
+} // namespace trace_event
+} // namespace base
+
+#endif // BASE_MEMORY_MALLOC_STATISTICS_H_

Powered by Google App Engine
This is Rietveld 408576698