Chromium Code Reviews| 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..2fd3d0ad9d1e36fb2437bc5af577d89f502fc2fb 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 |
| + 0, |
|
Alexei Svitkine (slow)
2015/03/06 15:49:08
There is already a default overflow bucket between
reveman
2015/03/07 23:05:45
Done.
|
| + 4 * 1024 * 1024, // 4 GB |
| + 256); |
|
Alexei Svitkine (slow)
2015/03/06 15:49:08
Why do you need 256 buckets? This is much more tha
reveman
2015/03/07 23:05:45
Reduced it to 50 which is the same as UMA_HISTOGRA
reveman
2015/03/09 00:31:21
Just realized that the bucket layout is already ex
|
| + |
| // Round up to multiple of page size. |
| size_t pages = (size + base::GetPageSize() - 1) / base::GetPageSize(); |