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

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 primiano 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
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 fe8423a72753a4822fca54881bef832979b58f11..07752f1922b05f3999becdf8316f2ab517b31dc5 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"
@@ -116,6 +117,9 @@ MemoryDumpManager::MemoryDumpManager()
? CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableHeapProfiling)
: false;
+
+ if (heap_profiling_enabled_)
+ AllocationContextTracker::SetCaptureEnabled(true);
}
MemoryDumpManager::~MemoryDumpManager() {

Powered by Google App Engine
This is Rietveld 408576698