Index: content/child/child_discardable_shared_memory_manager.cc |
diff --git a/content/child/child_discardable_shared_memory_manager.cc b/content/child/child_discardable_shared_memory_manager.cc |
index c6990e4a8fcb3cfb3646725cea9222325f51e0a1..cf4e488dcba6f12cf21cf7f70a1b0a0f821a65e6 100644 |
--- a/content/child/child_discardable_shared_memory_manager.cc |
+++ b/content/child/child_discardable_shared_memory_manager.cc |
@@ -6,6 +6,7 @@ |
#include "base/debug/crash_logging.h" |
#include "base/memory/discardable_shared_memory.h" |
+#include "base/metrics/histogram.h" |
#include "base/process/process_metrics.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/trace_event/trace_event.h" |
@@ -66,6 +67,12 @@ ChildDiscardableSharedMemoryManager::AllocateLockedDiscardableMemory( |
DCHECK_NE(size, 0u); |
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.DiscardableAllocationSize", |
+ size / 1024, // In KB |
+ 1, |
+ 4 * 1024 * 1024, // 4 GB |
+ 50); |
+ |
// Round up to multiple of page size. |
size_t pages = (size + base::GetPageSize() - 1) / base::GetPageSize(); |