summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_main_loop.cc
diff options
context:
space:
mode:
authorprimiano <primiano@chromium.org>2015-04-21 11:35:11 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-21 18:35:57 +0000
commit9f23f386369f508a517b56a39168fe37ca3d3396 (patch)
treef0253a33516d114450b0adda600dbda47453e5c0 /content/browser/browser_main_loop.cc
parentd5f975795266be1963a95d89d71aedb874b4df49 (diff)
downloadchromium_src-9f23f386369f508a517b56a39168fe37ca3d3396.zip
chromium_src-9f23f386369f508a517b56a39168fe37ca3d3396.tar.gz
chromium_src-9f23f386369f508a517b56a39168fe37ca3d3396.tar.bz2
[tracing] Enable and expose the memory tracing infrastructure
Enables the MemoryDumpManager registration in both the browser and child process startup path. As a consequence, all the memory tracing infrastructure is exposed to Chrome via the "memory-infra" category (disabled by default). See go/memory-infra for motivations and design docs. BUG=458295 TBR=nduca@chromium.org Review URL: https://codereview.chromium.org/1092743004 Cr-Commit-Position: refs/heads/master@{#326079}
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r--content/browser/browser_main_loop.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index d485389..3dfc8bd 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -20,6 +20,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "base/timer/hi_res_timer_manager.h"
+#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/device_sensors/device_inertial_sensor_service.h"
@@ -573,6 +574,8 @@ void BrowserMainLoop::MainMessageLoopStart() {
base::MessageLoop::current()->AddTaskObserver(memory_observer_.get());
}
+ base::trace_event::MemoryDumpManager::GetInstance()->Initialize();
+
#if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
trace_memory_controller_.reset(new base::trace_event::TraceMemoryController(
base::MessageLoop::current()->message_loop_proxy(),