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

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

Issue 1042723002: [tracing] IPC messages and stubs for inter-process memory dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_2_delegate
Patch Set: Rebase + skyostil@ review Created 5 years, 9 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
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/trace_message_filter.cc
diff --git a/content/browser/tracing/trace_message_filter.cc b/content/browser/tracing/trace_message_filter.cc
index 223fbd6186c54a532fce89848816d21ee062aed8..98757279f363fe925dc1e7f056a5628b504afb93 100644
--- a/content/browser/tracing/trace_message_filter.cc
+++ b/content/browser/tracing/trace_message_filter.cc
@@ -51,6 +51,10 @@ bool TraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnWatchEventMatched)
IPC_MESSAGE_HANDLER(TracingHostMsg_TraceLogStatusReply,
OnTraceLogStatusReply)
+ IPC_MESSAGE_HANDLER(TracingHostMsg_GlobalMemoryDumpRequest,
+ OnGlobalMemoryDumpRequest)
+ IPC_MESSAGE_HANDLER(TracingHostMsg_ProcessMemoryDumpResponse,
+ OnProcessMemoryDumpResponse)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -109,6 +113,18 @@ void TraceMessageFilter::SendCancelWatchEvent() {
Send(new TracingMsg_CancelWatchEvent);
}
+// Called by TracingControllerImpl, which handles the multiprocess coordination.
+void TraceMessageFilter::SendProcessMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args) {
+ Send(new TracingMsg_ProcessMemoryDumpRequest(args));
+}
+
+// Called by TracingControllerImpl, which handles the multiprocess coordination.
+void TraceMessageFilter::SendGlobalMemoryDumpResponse(uint64 dump_guid,
+ bool success) {
+ Send(new TracingMsg_GlobalMemoryDumpResponse(dump_guid, success));
+}
+
void TraceMessageFilter::OnChildSupportsTracing() {
has_child_ = true;
TracingControllerImpl::GetInstance()->AddTraceMessageFilter(this);
@@ -167,4 +183,17 @@ void TraceMessageFilter::OnTraceLogStatusReply(
}
}
+void TraceMessageFilter::OnGlobalMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args) {
+ TracingControllerImpl::GetInstance()->RequestGlobalMemoryDump(
+ args,
+ base::Bind(&TraceMessageFilter::SendGlobalMemoryDumpResponse, this));
+}
+
+void TraceMessageFilter::OnProcessMemoryDumpResponse(uint64 dump_guid,
+ bool success) {
+ TracingControllerImpl::GetInstance()->OnProcessMemoryDumpResponse(
+ this, dump_guid, success);
+}
+
} // namespace content
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698