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 8af1d4dcc09912c2a6569fec88df88a33e54a0d7..a6d5e0739e96ff301b2582b1fee4f0cf16a92133 100644 |
--- a/content/common/host_discardable_shared_memory_manager.cc |
+++ b/content/common/host_discardable_shared_memory_manager.cc |
@@ -185,6 +185,15 @@ bool HostDiscardableSharedMemoryManager::OnMemoryDump( |
base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
segment->memory()->mapped_size()); |
+ ssize_t resident_size = |
+ base::trace_event::ProcessMemoryDump::CountResidentBytes( |
+ segment->memory()->memory(), segment->memory()->mapped_size()); |
+ if (resident_size >= 0) { |
+ dump->AddScalar("resident_size", |
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
+ static_cast<uint64>(resident_size)); |
+ } |
+ |
// Host can only tell if whole segment is locked or not. |
dump->AddScalar( |
"locked_size", base::trace_event::MemoryAllocatorDump::kUnitsBytes, |