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

Unified Diff: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp

Issue 2650863003: [tracing] Switch to new heap dump format. (Closed)
Patch Set: Address comments (heaps_v2) Created 3 years, 9 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/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);

Powered by Google App Engine
This is Rietveld 408576698