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

Unified Diff: content/browser/profiler_controller_impl.cc

Issue 10041017: Show gpu process stats in about:tcmalloc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with correct (?) layering Created 8 years, 8 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/profiler_controller_impl.cc
diff --git a/content/browser/profiler_controller_impl.cc b/content/browser/profiler_controller_impl.cc
index a850cfd92c3e696eb53240217f1d35b49b0c0310..9a6c6fe778765e5855b563016b08ab7a4e9202a5 100644
--- a/content/browser/profiler_controller_impl.cc
+++ b/content/browser/profiler_controller_impl.cc
@@ -62,6 +62,28 @@ void ProfilerControllerImpl::OnProfilerDataCollected(
}
}
+#if defined(USE_TCMALLOC)
+void ProfilerControllerImpl::OnTcmallocStatsCollected(
+ base::ProcessId pid,
+ ProcessType process_type,
+ const std::string& output) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(&ProfilerControllerImpl::OnTcmallocStatsCollected,
+ base::Unretained(this),
+ pid,
+ process_type,
+ output));
+ return;
+ }
+
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (subscriber_)
+ subscriber_->OnTcmallocStatsCollected(pid, process_type, output);
+}
+#endif
+
void ProfilerControllerImpl::Register(ProfilerSubscriber* subscriber) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!subscriber_);

Powered by Google App Engine
This is Rietveld 408576698