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

Unified Diff: content/browser/profiler_message_filter.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_message_filter.cc
diff --git a/content/browser/profiler_message_filter.cc b/content/browser/profiler_message_filter.cc
index d94c7d165ca088756fc8be3e72f1bbbc87d8a9b9..4d6e43d8c1c3b2bdd5f32a4eccc7b4348894920a 100644
--- a/content/browser/profiler_message_filter.cc
+++ b/content/browser/profiler_message_filter.cc
@@ -5,6 +5,7 @@
#include "content/browser/profiler_message_filter.h"
#include "base/tracked_objects.h"
+#include "base/process_util.h"
#include "content/browser/profiler_controller_impl.h"
#include "content/common/child_process_messages.h"
@@ -31,6 +32,9 @@ bool ProfilerMessageFilter::OnMessageReceived(const IPC::Message& message,
IPC_BEGIN_MESSAGE_MAP_EX(ProfilerMessageFilter, message, *message_was_ok)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildProfilerData,
OnChildProfilerData)
+#if defined(USE_TCMALLOC)
+ IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TcmallocStats, OnTcmallocStats)
+#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
return handled;
@@ -43,4 +47,12 @@ void ProfilerMessageFilter::OnChildProfilerData(
sequence_number, profiler_data, process_type_);
}
+#if defined(USE_TCMALLOC)
+void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) {
+ base::ProcessId pid = base::GetProcId(peer_handle());
+ ProfilerControllerImpl::GetInstance()->OnTcmallocStatsCollected(
+ pid, process_type_, output);
+}
+#endif
+
}

Powered by Google App Engine
This is Rietveld 408576698