Index: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp |
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp |
index b189b629ce84c39e3d4cd72da30c077858b77c32..0642d3d4cac353b01fd6ae60632c77bc09c2585f 100644 |
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp |
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp |
@@ -131,25 +131,8 @@ bool PartitionAllocMemoryDumpProvider::OnMemoryDump( |
MemoryDumpLevelOfDetail levelOfDetail = args.level_of_detail; |
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); |
- // Dump only the overhead estimation in non-detailed dumps. |
- 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, "partition_alloc"); |
+ MutexLocker locker(m_allocationRegisterMutex); |
+ memoryDump->DumpHeapUsage(*m_allocationRegister, kPartitionAllocDumpName); |
} |
PartitionStatsDumperImpl partitionStatsDumper(memoryDump, levelOfDetail); |