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

Unified Diff: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.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/PartitionAllocMemoryDumpProvider.cpp
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
index 84e221517da6ffbecb161e0bd18b9928e0929e1d..1d9d502dedaccd7a771e8420dac175026a22b671 100644
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
@@ -136,25 +136,8 @@ bool PartitionAllocMemoryDumpProvider::OnMemoryDump(
MemoryDumpLevelOfDetail level_of_detail = args.level_of_detail;
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_);
- // Dump only the overhead estimation in non-detailed dumps.
- 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, "partition_alloc");
+ MutexLocker locker(allocation_register_mutex_);
+ memory_dump->DumpHeapUsage(*allocation_register_, kPartitionAllocDumpName);
}
PartitionStatsDumperImpl partition_stats_dumper(memory_dump, level_of_detail);
« no previous file with comments | « base/trace_event/trace_event_memory_overhead.cc ('k') | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698