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

Unified Diff: components/tracing/child_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 | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 197d22f51f6481291da012b7eb95a6d33f2ab131..d20ba7b1b04da69eae5823588fdd8b222b84053f 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -39,6 +39,10 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(TracingMsg_GetTraceLogStatus, OnGetTraceLogStatus)
IPC_MESSAGE_HANDLER(TracingMsg_SetWatchEvent, OnSetWatchEvent)
IPC_MESSAGE_HANDLER(TracingMsg_CancelWatchEvent, OnCancelWatchEvent)
+ IPC_MESSAGE_HANDLER(TracingMsg_ProcessMemoryDumpRequest,
+ OnProcessMemoryDumpRequest)
+ IPC_MESSAGE_HANDLER(TracingMsg_GlobalMemoryDumpResponse,
+ OnGlobalMemoryDumpResponse)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -168,4 +172,33 @@ void ChildTraceMessageFilter::OnMonitoringTraceDataCollected(
sender_->Send(new TracingHostMsg_CaptureMonitoringSnapshotAck());
}
+// Sent by the Browser's MemoryDumpManager when coordinating a global dump.
+void ChildTraceMessageFilter::OnProcessMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args) {
+ // TODO(primiano): create local dump and send a response back to the browser.
+ NOTIMPLEMENTED();
+}
+
+// Initiates a dump request, asking the Browser's MemoryDumpManager to
+// coordinate a global memory dump. The Browser's MDM will answer back with a
+// MemoryDumpResponse when all the child processes (including this one) have
+// dumped, or with a NACK (|success| == false) if the dump failed (e.g., due to
+// a collision with a concurrent request from another child process).
+void ChildTraceMessageFilter::SendGlobalMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args,
+ const base::trace_event::MemoryDumpCallback& callback) {
+ // TODO(primiano): implement the logic to send the request to the browser
+ // process and keep track of that.
+ NOTIMPLEMENTED();
+}
+
+// Sent by the Browser's MemoryDumpManager in response of a dump request
+// initiated by this child process.
+void ChildTraceMessageFilter::OnGlobalMemoryDumpResponse(uint64 dump_guid,
+ bool success) {
+ // TODO(primiano): implement the logic to handle the global response from
+ // the browser and clear up the bookkeeping.
+ NOTIMPLEMENTED();
+}
+
} // namespace tracing
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698