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

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 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
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..5281cd63cf4578306a757bb891216a314d1a90a6 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 bookeeping.
Sami 2015/03/31 14:54:36 s/bookeeping/bookkeeping/
Primiano Tucci (use gerrit) 2015/04/01 11:05:40 Done.
+ NOTIMPLEMENTED();
+}
+
} // namespace tracing

Powered by Google App Engine
This is Rietveld 408576698