Index: base/trace_event/memory_dump_manager.cc |
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc |
index 7b853279d6900594eb95d159322c57bd4a66fdea..8278c7b00b8b51760c33eb6574e0d347bbe2f7ad 100644 |
--- a/base/trace_event/memory_dump_manager.cc |
+++ b/base/trace_event/memory_dump_manager.cc |
@@ -733,6 +733,16 @@ uint32_t MemoryDumpManager::GetDumpsSumKb(const std::string& pattern, |
} |
// static |
+void MemoryDumpManager::FillOsDumpFromProcessMemoryDump( |
Primiano Tucci (use gerrit)
2017/03/24 11:44:43
move this to the anonymous namespace (and remove t
hjd
2017/03/24 12:12:54
Done.
|
+ MemoryDumpCallbackResult::OSMemDump& osDump, |
+ ProcessMemoryDump* pmd) { |
+ if (pmd->has_process_totals()) { |
+ auto* totals = pmd->process_totals(); |
+ osDump.resident_set_kb = totals->resident_set_bytes() / 1024; |
+ } |
+} |
+ |
+// static |
void MemoryDumpManager::FinalizeDumpAndAddToTrace( |
std::unique_ptr<ProcessMemoryDumpAsyncState> pmd_async_state) { |
HEAP_PROFILER_SCOPED_IGNORE; |
@@ -791,6 +801,9 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace( |
GetDumpsSumKb("partition_alloc/partitions/*", process_memory_dump); |
result.chrome_dump.blink_gc_total_kb = |
GetDumpsSumKb("blink_gc", process_memory_dump); |
+ } else { |
+ auto& os_dump = result.extra_processes_dump[pid]; |
+ FillOsDumpFromProcessMemoryDump(os_dump, process_memory_dump); |
Primiano Tucci (use gerrit)
2017/03/24 11:44:43
I think we want to do this also in the case above
hjd
2017/03/24 12:12:54
oops, I must have lost it in a rebase, thanks!
|
} |
} |