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 d1025c1215a68ef8127f70ca7de1e362c6667cc0..489e4191381e1bf35c0415fd2b2d5cb3c64c3774 100644 |
--- a/base/trace_event/memory_dump_manager.cc |
+++ b/base/trace_event/memory_dump_manager.cc |
@@ -92,6 +92,15 @@ void OnGlobalDumpDone(MemoryDumpCallback wrapped_callback, |
} |
} |
+void FillOsDumpFromProcessMemoryDump( |
+ MemoryDumpCallbackResult::OSMemDump& osDump, |
Primiano Tucci (use gerrit)
2017/04/03 08:49:27
output arguments should:
1. use pointers, not refe
|
+ ProcessMemoryDump* pmd) { |
+ if (pmd->has_process_totals()) { |
+ auto* totals = pmd->process_totals(); |
Primiano Tucci (use gerrit)
2017/04/03 08:49:27
minor thing about "auto". There are no official ru
|
+ osDump.resident_set_kb = totals->resident_set_bytes() / 1024; |
+ } |
+} |
+ |
// Proxy class which wraps a ConvertableToTraceFormat owned by the |
// |session_state| into a proxy object that can be added to the trace event log. |
// This is to solve the problem that the MemoryDumpSessionState is refcounted |
@@ -798,6 +807,10 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace( |
GetDumpsSumKb("partition_alloc/partitions/*", process_memory_dump); |
result.chrome_dump.blink_gc_total_kb = |
GetDumpsSumKb("blink_gc", process_memory_dump); |
+ FillOsDumpFromProcessMemoryDump(result.os_dump, process_memory_dump); |
+ } else { |
+ auto& os_dump = result.extra_processes_dump[pid]; |
+ FillOsDumpFromProcessMemoryDump(os_dump, process_memory_dump); |
} |
} |