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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1391933004: [Tracing] Add hook to PartitionAlloc for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address jl comments Created 5 years, 2 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 | « no previous file | content/child/web_memory_dump_provider_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 4b84a8b20c2985803c8adc204a2cf9c505a8e7e7..cb3809360174ad6003131abd61a6659630202399 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -13,6 +13,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_provider.h"
#include "base/trace_event/memory_dump_session_state.h"
+#include "base/trace_event/memory_profiler_allocation_context.h"
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event_argument.h"
#include "build/build_config.h"
@@ -114,6 +115,9 @@ MemoryDumpManager::MemoryDumpManager()
? CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableHeapProfiling)
: false;
+
+ if (heap_profiling_enabled_)
+ AllocationContextTracker::SetCaptureEnabled(true);
}
MemoryDumpManager::~MemoryDumpManager() {
« no previous file with comments | « no previous file | content/child/web_memory_dump_provider_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698