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

Side by Side Diff: components/tracing/tracing_messages.h

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, 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Multiply-included message header, no traditional include guard. 5 // Multiply-included message header, no traditional include guard.
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
11 #include "base/trace_event/memory_dump_request_args.h"
11 #include "base/trace_event/trace_event_impl.h" 12 #include "base/trace_event/trace_event_impl.h"
12 #include "ipc/ipc_channel_handle.h" 13 #include "ipc/ipc_channel_handle.h"
13 #include "ipc/ipc_message_macros.h" 14 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_message_utils.h" 15 #include "ipc/ipc_message_utils.h"
15 #include "ipc/ipc_platform_file.h" 16 #include "ipc/ipc_platform_file.h"
16 17
17 #define IPC_MESSAGE_START TracingMsgStart 18 #define IPC_MESSAGE_START TracingMsgStart
18 19
19 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus) 20 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus)
20 IPC_STRUCT_TRAITS_MEMBER(event_capacity) 21 IPC_STRUCT_TRAITS_MEMBER(event_capacity)
21 IPC_STRUCT_TRAITS_MEMBER(event_count) 22 IPC_STRUCT_TRAITS_MEMBER(event_count)
22 IPC_STRUCT_TRAITS_END() 23 IPC_STRUCT_TRAITS_END()
23 24
25 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpRequestArgs)
26 IPC_STRUCT_TRAITS_MEMBER(dump_guid)
27 IPC_STRUCT_TRAITS_MEMBER(dump_type)
28 IPC_STRUCT_TRAITS_END()
29
30 IPC_ENUM_TRAITS_MAX_VALUE(
31 base::trace_event::MemoryDumpType,
32 static_cast<int>(base::trace_event::MemoryDumpType::LAST))
Sami 2015/03/31 14:54:36 Should this be LAST - 1?
Primiano Tucci (use gerrit) 2015/04/01 11:05:41 Hm I think this is fine. in memory_dump_request_ar
Sami 2015/04/01 15:55:35 Ah, right, I was thinking it was the number of enu
33
24 // Sent to all child processes to enable trace event recording. 34 // Sent to all child processes to enable trace event recording.
25 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, 35 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing,
26 std::string /* category_filter_str */, 36 std::string /* category_filter_str */,
27 base::TimeTicks /* browser_time */, 37 base::TimeTicks /* browser_time */,
28 std::string /* base::trace_event::TraceOptions */) 38 std::string /* base::trace_event::TraceOptions */)
29 39
30 // Sent to all child processes to disable trace event recording. 40 // Sent to all child processes to disable trace event recording.
31 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) 41 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing)
32 42
33 // Sent to all child processes to start monitoring. 43 // Sent to all child processes to start monitoring.
(...skipping 12 matching lines...) Expand all
46 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus) 56 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus)
47 57
48 // Sent to all child processes to set watch event. 58 // Sent to all child processes to set watch event.
49 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, 59 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent,
50 std::string /* category_name */, 60 std::string /* category_name */,
51 std::string /* event_name */) 61 std::string /* event_name */)
52 62
53 // Sent to all child processes to clear watch event. 63 // Sent to all child processes to clear watch event.
54 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) 64 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent)
55 65
66 // Sent to all child processes to request a local (current process) memory dump.
67 IPC_MESSAGE_CONTROL1(TracingMsg_ProcessMemoryDumpRequest,
68 base::trace_event::MemoryDumpRequestArgs)
69
70 // Reply to TracingHostMsg_GlobalMemoryDumpRequest, sent by the browser process.
71 // This is to get the result of a global dump initiated by a child process.
72 IPC_MESSAGE_CONTROL2(TracingMsg_GlobalMemoryDumpResponse,
73 uint64 /* dump_guid */,
74 bool /* success */)
75
56 // Sent everytime when a watch event is matched. 76 // Sent everytime when a watch event is matched.
57 IPC_MESSAGE_CONTROL0(TracingHostMsg_WatchEventMatched) 77 IPC_MESSAGE_CONTROL0(TracingHostMsg_WatchEventMatched)
58 78
59 // Notify the browser that this child process supports tracing. 79 // Notify the browser that this child process supports tracing.
60 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) 80 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing)
61 81
62 // Reply from child processes acking TracingMsg_EndTracing. 82 // Reply from child processes acking TracingMsg_EndTracing.
63 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, 83 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck,
64 std::vector<std::string> /* known_categories */) 84 std::vector<std::string> /* known_categories */)
65 85
66 // Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot. 86 // Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot.
67 IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck) 87 IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck)
68 88
69 // Child processes send back trace data in JSON chunks. 89 // Child processes send back trace data in JSON chunks.
70 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, 90 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected,
71 std::string /*json trace data*/) 91 std::string /*json trace data*/)
72 92
73 // Child processes send back trace data of the current monitoring 93 // Child processes send back trace data of the current monitoring
74 // in JSON chunks. 94 // in JSON chunks.
75 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected, 95 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected,
76 std::string /*json trace data*/) 96 std::string /*json trace data*/)
77 97
78 // Reply to TracingMsg_GetTraceLogStatus. 98 // Reply to TracingMsg_GetTraceLogStatus.
79 IPC_MESSAGE_CONTROL1( 99 IPC_MESSAGE_CONTROL1(
80 TracingHostMsg_TraceLogStatusReply, 100 TracingHostMsg_TraceLogStatusReply,
81 base::trace_event::TraceLogStatus /*status of the trace log*/) 101 base::trace_event::TraceLogStatus /*status of the trace log*/)
102
103 // Sent to the browser to initiate a global memory dump from a child process.
104 IPC_MESSAGE_CONTROL1(TracingHostMsg_GlobalMemoryDumpRequest,
105 base::trace_event::MemoryDumpRequestArgs)
106
107 // Reply to TracingMsg_ProcessMemoryDumpRequest.
108 IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse,
109 uint64 /* dump_guid */,
110 bool /* success */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698