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

Unified Diff: third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc

Issue 1877313003: [tracing] Track number of allocations in heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix indentation. Created 4 years, 8 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
Index: third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
diff --git a/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc b/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
index 3c2c2c8fef9ed638a7919a0edce84253ec4b9435..927b2ce87ba282fe18b91a4061714afdb8eea90b 100644
--- a/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
+++ b/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
@@ -168,15 +168,15 @@ WebProcessMemoryDumpImpl::createDiscardableMemoryAllocatorDump(
}
void WebProcessMemoryDumpImpl::dumpHeapUsage(
- const base::hash_map<base::trace_event::AllocationContext, size_t>&
- bytes_by_context,
+ const base::hash_map<base::trace_event::AllocationContext,
+ base::trace_event::AllocationMetrics>& metrics_by_context,
base::trace_event::TraceEventMemoryOverhead& overhead,
const char* allocator_name) {
- if (!bytes_by_context.empty()) {
+ if (!metrics_by_context.empty()) {
scoped_refptr<base::trace_event::MemoryDumpSessionState> session_state =
process_memory_dump_->session_state();
std::unique_ptr<base::trace_event::TracedValue> heap_dump = ExportHeapDump(
- bytes_by_context, session_state->stack_frame_deduplicator(),
+ metrics_by_context, session_state->stack_frame_deduplicator(),
session_state->type_name_deduplicator());
process_memory_dump_->AddHeapDump(allocator_name, std::move(heap_dump));
}

Powered by Google App Engine
This is Rietveld 408576698