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

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp

Issue 2650863003: [tracing] Switch to new heap dump format. (Closed)
Patch Set: Fix rebase damage Created 3 years, 7 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/heap/BlinkGCMemoryDumpProvider.cpp
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
index baefa38a3657d96e2ca457172b38070de389e552..9840f30b71ead1f158c22af4fdc312450716b941 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
@@ -67,24 +67,8 @@ bool BlinkGCMemoryDumpProvider::OnMemoryDump(
DumpMemoryTotals(memory_dump);
if (is_heap_profiling_enabled_) {
- // Overhead should always be reported, regardless of light vs. heavy.
- base::trace_event::TraceEventMemoryOverhead overhead;
- std::unordered_map<base::trace_event::AllocationContext,
- base::trace_event::AllocationMetrics>
- metrics_by_context;
- {
- MutexLocker locker(allocation_register_mutex_);
- if (level_of_detail == MemoryDumpLevelOfDetail::DETAILED) {
- for (const auto& alloc_size : *allocation_register_) {
- base::trace_event::AllocationMetrics& metrics =
- metrics_by_context[alloc_size.context];
- metrics.size += alloc_size.size;
- metrics.count++;
- }
- }
- allocation_register_->EstimateTraceMemoryOverhead(&overhead);
- }
- memory_dump->DumpHeapUsage(metrics_by_context, overhead, "blink_gc");
+ MutexLocker locker(allocation_register_mutex_);
+ memory_dump->DumpHeapUsage(*allocation_register_, "blink_gc");
}
// Merge all dumps collected by ThreadHeap::collectGarbage.

Powered by Google App Engine
This is Rietveld 408576698