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

Unified Diff: base/trace_event/process_memory_dump.cc

Issue 2016613002: Remove ProcessMemoryDump::AddHeapDump() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « base/trace_event/process_memory_dump.h ('k') | base/trace_event/process_memory_dump_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_dump.cc
diff --git a/base/trace_event/process_memory_dump.cc b/base/trace_event/process_memory_dump.cc
index 52eccbe1a0cfd8263eca4e7407b463e36fcc36ff..ada6aa449e210b58158c6e02223086751b90de4b 100644
--- a/base/trace_event/process_memory_dump.cc
+++ b/base/trace_event/process_memory_dump.cc
@@ -219,21 +219,16 @@ MemoryAllocatorDump* ProcessMemoryDump::GetSharedGlobalAllocatorDump(
return GetAllocatorDump(GetSharedGlobalAllocatorDumpName(guid));
}
-void ProcessMemoryDump::AddHeapDump(const std::string& absolute_name,
- std::unique_ptr<TracedValue> heap_dump) {
- DCHECK_EQ(0ul, heap_dumps_.count(absolute_name));
- heap_dumps_[absolute_name] = std::move(heap_dump);
-}
-
void ProcessMemoryDump::DumpHeapUsage(
const base::hash_map<base::trace_event::AllocationContext,
base::trace_event::AllocationMetrics>& metrics_by_context,
base::trace_event::TraceEventMemoryOverhead& overhead,
const char* allocator_name) {
if (!metrics_by_context.empty()) {
+ DCHECK_EQ(0ul, heap_dumps_.count(allocator_name));
std::unique_ptr<TracedValue> heap_dump = ExportHeapDump(
metrics_by_context, *session_state());
- AddHeapDump(allocator_name, std::move(heap_dump));
+ heap_dumps_[allocator_name] = std::move(heap_dump);
}
std::string base_name = base::StringPrintf("tracing/heap_profiler_%s",
« no previous file with comments | « base/trace_event/process_memory_dump.h ('k') | base/trace_event/process_memory_dump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698