Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: gin/v8_isolate_memory_dump_provider.cc

Issue 2156043002: Also report peak malloc memory usage from V8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/v8_isolate_memory_dump_provider.cc
diff --git a/gin/v8_isolate_memory_dump_provider.cc b/gin/v8_isolate_memory_dump_provider.cc
index 601937b45f0a2820b0789c14a90263016df9448b..d92f82b9e2052db8c433f34ce78c9fd46dcdb39d 100644
--- a/gin/v8_isolate_memory_dump_provider.cc
+++ b/gin/v8_isolate_memory_dump_provider.cc
@@ -172,6 +172,14 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
system_allocator_name);
}
+ std::string peak_malloc_name = dump_base_name + "/malloc_peak";
primiano CORP (USE chromium) 2016/07/18 10:58:00 I think the best approach would be reporting this
+ auto* peak_malloc_dump =
+ process_memory_dump->CreateAllocatorDump(peak_malloc_name);
+ peak_malloc_dump->AddScalar(
+ base::trace_event::MemoryAllocatorDump::kNameSize,
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes,
+ heap_statistics.peak_malloced_memory());
+
// Add an empty row for the heap_spaces. This is to keep the shape of the
// dump stable, whether code stats are enabled or not.
auto* heap_spaces_dump =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698