| Index: base/trace_event/malloc_dump_provider.cc
|
| diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc
|
| index 4683694d6bb60dc15a59b544dcadf639a7464e84..1f309a4f0507a78c94eedb9ec0b1ab12c197c295 100644
|
| --- a/base/trace_event/malloc_dump_provider.cc
|
| +++ b/base/trace_event/malloc_dump_provider.cc
|
| @@ -242,22 +242,10 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
|
| // Enclosing all the temporariy data structures in a scope, so that the heap
|
| // profiler does not see unabalanced malloc/free calls from these containers.
|
| {
|
| - TraceEventMemoryOverhead overhead;
|
| - hash_map<AllocationContext, AllocationMetrics> metrics_by_context;
|
| - {
|
| - AutoLock lock(allocation_register_lock_);
|
| - if (allocation_register_) {
|
| - if (args.level_of_detail == MemoryDumpLevelOfDetail::DETAILED) {
|
| - for (const auto& alloc_size : *allocation_register_) {
|
| - AllocationMetrics& metrics = metrics_by_context[alloc_size.context];
|
| - metrics.size += alloc_size.size;
|
| - metrics.count++;
|
| - }
|
| - }
|
| - allocation_register_->EstimateTraceMemoryOverhead(&overhead);
|
| - }
|
| - } // lock(allocation_register_lock_)
|
| - pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc");
|
| + AutoLock lock(allocation_register_lock_);
|
| + if (allocation_register_) {
|
| + pmd->DumpHeapUsage(*allocation_register_, "malloc");
|
| + }
|
| }
|
| tid_dumping_heap_ = kInvalidThreadId;
|
|
|
|
|