| 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 3565b8b95be29c3b254f45e4b38a2af5b998768e..64a14422632571aacde12f9e0238e4420e387e5e 100644
|
| --- a/base/trace_event/malloc_dump_provider.cc
|
| +++ b/base/trace_event/malloc_dump_provider.cc
|
| @@ -13,7 +13,7 @@
|
| #include "base/trace_event/heap_profiler_allocation_context.h"
|
| #include "base/trace_event/heap_profiler_allocation_context_tracker.h"
|
| #include "base/trace_event/heap_profiler_allocation_register.h"
|
| -#include "base/trace_event/heap_profiler_heap_dump_writer.h"
|
| +#include "base/trace_event/heap_profiler_event_writer.h"
|
| #include "base/trace_event/process_memory_dump.h"
|
| #include "base/trace_event/trace_event_argument.h"
|
| #include "build/build_config.h"
|
| @@ -295,22 +295,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;
|
|
|
|
|