Chromium Code Reviews| Index: content/common/host_discardable_shared_memory_manager.cc |
| diff --git a/content/common/host_discardable_shared_memory_manager.cc b/content/common/host_discardable_shared_memory_manager.cc |
| index 7951ea127cc6238b4e207465cd5b8a9245a58e87..bfb689054948f6fd52da9897cd10805ea1821970 100644 |
| --- a/content/common/host_discardable_shared_memory_manager.cc |
| +++ b/content/common/host_discardable_shared_memory_manager.cc |
| @@ -222,6 +222,16 @@ HostDiscardableSharedMemoryManager::AllocateLockedDiscardableMemory( |
| bool HostDiscardableSharedMemoryManager::OnMemoryDump( |
| const base::trace_event::MemoryDumpArgs& args, |
| base::trace_event::ProcessMemoryDump* pmd) { |
| + if (args.level_of_detail == |
| + base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND) { |
| + base::trace_event::MemoryAllocatorDump* total_dump = |
| + pmd->CreateAllocatorDump("discardable"); |
| + total_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
| + GetBytesAllocated()); |
|
Primiano Tucci (use gerrit)
2016/06/02 19:31:41
can you call this without the lock?
ssid
2016/06/03 00:27:47
Hmm, we can only be stalling the memory-infra thre
|
| + return true; |
| + } |
| + |
| base::AutoLock lock(lock_); |
| for (const auto& process_entry : processes_) { |
| const int child_process_id = process_entry.first; |