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

Unified Diff: chrome/browser/chrome_browser_main_linux.cc

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup, run in all renderers 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: chrome/browser/chrome_browser_main_linux.cc
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc
index 3a3ea520aa933af80820ae281efd38bdd00b2931..9c709c1b5cc203d8adbdb6e24590a2d73ee5a337 100644
--- a/chrome/browser/chrome_browser_main_linux.cc
+++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chrome_browser_main_linux.h"
+#include "base/debug/trace_memory.h"
+
#if !defined(OS_CHROMEOS)
#include "chrome/browser/storage_monitor/storage_monitor_linux.h"
#include "content/public/browser/browser_thread.h"
@@ -133,6 +135,13 @@ void ChromeBrowserMainPartsLinux::PreProfileInit() {
ChromeBrowserMainPartsPosix::PreProfileInit();
}
+void ChromeBrowserMainPartsLinux::PreMainMessageLoopRun() {
+ ChromeBrowserMainPartsPosix::PreMainMessageLoopRun();
+
+ // TODO(jamescook): Only start this when tracing is flipped on.
+ base::TraceMemoryStart();
+}
+
void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
ChromeBrowserMainPartsPosix::PostMainMessageLoopRun();
@@ -142,4 +151,6 @@ void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
// single browser_test.
storage_monitor_.reset();
#endif
+
+ base::TraceMemoryStop();
}
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.h ('k') | content/renderer/renderer_main_platform_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698