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

Unified Diff: content/renderer/renderer_main_platform_delegate_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: content/renderer/renderer_main_platform_delegate_linux.cc
diff --git a/content/renderer/renderer_main_platform_delegate_linux.cc b/content/renderer/renderer_main_platform_delegate_linux.cc
index 52b0ea245631c44e9df2439517f61b7e72f970d5..57845cf7797ae7cbbfc0d3c493e36180ae08a4a7 100644
--- a/content/renderer/renderer_main_platform_delegate_linux.cc
+++ b/content/renderer/renderer_main_platform_delegate_linux.cc
@@ -8,8 +8,10 @@
#include <sys/stat.h>
#include "base/command_line.h"
+#include "base/debug/trace_memory.h"
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/message_loop.h"
#include "content/common/sandbox_linux.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/sandbox_init.h"
@@ -34,9 +36,14 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
if (command_line.HasSwitch(switches::kEnableVtune))
vTune::InitializeVtuneForV8();
#endif
+
+ // TODO(jamescook): Only start this when tracing is flipped on.
+ base::TraceMemoryStart();
+
}
void RendererMainPlatformDelegate::PlatformUninitialize() {
+ base::TraceMemoryStop();
}
bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.cc ('k') | third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698