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..413776be9233a22d53136a0d7fc676928be749df 100644 |
--- a/content/common/host_discardable_shared_memory_manager.cc |
+++ b/content/common/host_discardable_shared_memory_manager.cc |
@@ -185,6 +185,20 @@ bool HostDiscardableSharedMemoryManager::OnMemoryDump( |
base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
segment->memory()->mapped_size()); |
+#if defined(COUNT_RESIDENT_BYTES_SUPPORTED) |
+ if (args.level_of_detail == |
+ base::trace_event::MemoryDumpLevelOfDetail::DETAILED) { |
+ int64 resident_size = |
reveman
2015/10/07 13:41:44
nit: size_t as that's now the return type for Coun
ssid
2015/10/07 14:46:45
Done.
|
+ base::trace_event::ProcessMemoryDump::CountResidentBytes( |
+ segment->memory()->memory(), segment->memory()->mapped_size()); |
+ if (resident_size >= 0) { |
reveman
2015/10/07 13:41:44
nit: s/resident_size >= 0/resident_size/ after swi
ssid
2015/10/07 14:46:45
0 is still reported. removing if.
|
+ dump->AddScalar("resident_size", |
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
+ static_cast<uint64>(resident_size)); |
+ } |
+ } |
+#endif // defined(COUNT_RESIDENT_BYTES_SUPPORTED) |
+ |
// Host can only tell if whole segment is locked or not. |
dump->AddScalar( |
"locked_size", base::trace_event::MemoryAllocatorDump::kUnitsBytes, |