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

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

Issue 2650863003: [tracing] Switch to new heap dump format. (Closed)
Patch Set: Add 'version' field. Created 3 years, 11 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 65ef5dee4f06439b05f7b8ab8dcdd65af40863d2..426b34d4b24f99a201a4f3b276e4479968a47ba0 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
@@ -64,24 +64,8 @@ bool BlinkGCMemoryDumpProvider::OnMemoryDump(
dumpMemoryTotals(memoryDump);
if (m_isHeapProfilingEnabled) {
- // Overhead should always be reported, regardless of light vs. heavy.
- base::trace_event::TraceEventMemoryOverhead overhead;
- base::hash_map<base::trace_event::AllocationContext,
- base::trace_event::AllocationMetrics>
- metricsByContext;
- {
- MutexLocker locker(m_allocationRegisterMutex);
- if (levelOfDetail == MemoryDumpLevelOfDetail::DETAILED) {
- for (const auto& allocSize : *m_allocationRegister) {
- base::trace_event::AllocationMetrics& metrics =
- metricsByContext[allocSize.context];
- metrics.size += allocSize.size;
- metrics.count++;
- }
- }
- m_allocationRegister->EstimateTraceMemoryOverhead(&overhead);
- }
- memoryDump->DumpHeapUsage(metricsByContext, overhead, "blink_gc");
+ MutexLocker locker(m_allocationRegisterMutex);
+ memoryDump->DumpHeapUsage(*m_allocationRegister, "blink_gc");
}
// Merge all dumps collected by ThreadHeap::collectGarbage.

Powered by Google App Engine
This is Rietveld 408576698