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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 1417003003: [tracing] Dump child processes' memory metrics in browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: dNits. Created 5 years, 1 month 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/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index 07347573a181dde527af44a1ee01ea2e6dd46e51..7fb1112131a0325367947e1d0f0c9bf323ec8518 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h"
+#include "components/tracing/process_metrics_memory_dump_manager.h"
#include "content/browser/tracing/file_tracing_provider_impl.h"
#include "content/browser/tracing/power_tracing_agent.h"
#include "content/browser/tracing/trace_message_filter.h"
@@ -489,6 +490,9 @@ void TracingControllerImpl::AddTraceMessageFilter(
return;
}
+ tracing::ProcessMetricsMemoryDumpManager::GetInstance()->RegisterForProcess(
+ trace_message_filter->peer_pid());
Primiano Tucci (use gerrit) 2015/11/17 10:44:13 Shouldn't this be >PeerHandle() ?
ssid 2015/11/17 13:55:06 Done.
+
trace_message_filters_.insert(trace_message_filter);
if (can_cancel_watch_event()) {
trace_message_filter->SendSetWatchEvent(watch_category_name_,
@@ -517,6 +521,9 @@ void TracingControllerImpl::RemoveTraceMessageFilter(
return;
}
+ tracing::ProcessMetricsMemoryDumpManager::GetInstance()->UnregisterForProcess(
+ trace_message_filter->peer_pid());
Primiano Tucci (use gerrit) 2015/11/17 10:44:12 ditto
ssid 2015/11/17 13:55:06 Done.
+
// If a filter is removed while a response from that filter is pending then
// simulate the response. Otherwise the response count will be wrong and the
// completion callback will never be executed.

Powered by Google App Engine
This is Rietveld 408576698