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

Unified Diff: content/browser/browser_main_loop.cc

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 4 Created 7 years, 6 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: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 2c7c4a6f805c24eb854ae8a3550e93e8920ec7ad..5a32868a3e0e30cbcba844dfa7c3ca1d2912420c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -473,6 +473,9 @@ void BrowserMainLoop::MainMessageLoopStart() {
memory_observer_.reset(new MemoryObserver());
base::MessageLoop::current()->AddTaskObserver(memory_observer_.get());
}
+
+ trace_memory_controller_.reset(new base::debug::TraceMemoryController(
+ base::MessageLoop::current()->message_loop_proxy()));
}
void BrowserMainLoop::CreateThreads() {
@@ -645,6 +648,8 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
if (parts_)
parts_->PostMainMessageLoopRun();
+ trace_memory_controller_.reset();
+
#if !defined(OS_IOS)
// Destroying the GpuProcessHostUIShims on the UI thread posts a task to
// delete related objects on the GPU thread. This must be done before

Powered by Google App Engine
This is Rietveld 408576698