OLD | NEW |
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/debug/trace_event_impl.h" |
10 #include "base/sync_socket.h" | 11 #include "base/sync_socket.h" |
11 #include "ipc/ipc_channel_handle.h" | 12 #include "ipc/ipc_channel_handle.h" |
12 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
13 #include "ipc/ipc_message_utils.h" | 14 #include "ipc/ipc_message_utils.h" |
14 #include "ipc/ipc_platform_file.h" | 15 #include "ipc/ipc_platform_file.h" |
15 | 16 |
16 #define IPC_MESSAGE_START TracingMsgStart | 17 #define IPC_MESSAGE_START TracingMsgStart |
17 | 18 |
| 19 IPC_STRUCT_TRAITS_BEGIN(base::debug::TraceLogStatus) |
| 20 IPC_STRUCT_TRAITS_MEMBER(event_capacity) |
| 21 IPC_STRUCT_TRAITS_MEMBER(event_count) |
| 22 IPC_STRUCT_TRAITS_END() |
| 23 |
18 // Sent to all child processes to enable trace event recording. | 24 // Sent to all child processes to enable trace event recording. |
19 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, | 25 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, |
20 std::string /* category_filter_str */, | 26 std::string /* category_filter_str */, |
21 base::TimeTicks /* browser_time */, | 27 base::TimeTicks /* browser_time */, |
22 std::string /* base::debug::TraceOptions */) | 28 std::string /* base::debug::TraceOptions */) |
23 | 29 |
24 // Sent to all child processes to disable trace event recording. | 30 // Sent to all child processes to disable trace event recording. |
25 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) | 31 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) |
26 | 32 |
27 // Sent to all child processes to start monitoring. | 33 // Sent to all child processes to start monitoring. |
28 IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring, | 34 IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring, |
29 std::string /* category_filter_str */, | 35 std::string /* category_filter_str */, |
30 base::TimeTicks /* browser_time */, | 36 base::TimeTicks /* browser_time */, |
31 std::string /* base::debug::TraceOptions */) | 37 std::string /* base::debug::TraceOptions */) |
32 | 38 |
33 // Sent to all child processes to stop monitoring. | 39 // Sent to all child processes to stop monitoring. |
34 IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring) | 40 IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring) |
35 | 41 |
36 // Sent to all child processes to capture the current monitorint snapshot. | 42 // Sent to all child processes to capture the current monitorint snapshot. |
37 IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot) | 43 IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot) |
38 | 44 |
39 // Sent to all child processes to get trace buffer fullness. | 45 // Sent to all child processes to get trace buffer fullness. |
40 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull) | 46 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus) |
41 | 47 |
42 // Sent to all child processes to set watch event. | 48 // Sent to all child processes to set watch event. |
43 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, | 49 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, |
44 std::string /* category_name */, | 50 std::string /* category_name */, |
45 std::string /* event_name */) | 51 std::string /* event_name */) |
46 | 52 |
47 // Sent to all child processes to clear watch event. | 53 // Sent to all child processes to clear watch event. |
48 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) | 54 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) |
49 | 55 |
50 // Sent everytime when a watch event is matched. | 56 // Sent everytime when a watch event is matched. |
(...skipping 11 matching lines...) Expand all Loading... |
62 | 68 |
63 // Child processes send back trace data in JSON chunks. | 69 // Child processes send back trace data in JSON chunks. |
64 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, | 70 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, |
65 std::string /*json trace data*/) | 71 std::string /*json trace data*/) |
66 | 72 |
67 // Child processes send back trace data of the current monitoring | 73 // Child processes send back trace data of the current monitoring |
68 // in JSON chunks. | 74 // in JSON chunks. |
69 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected, | 75 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected, |
70 std::string /*json trace data*/) | 76 std::string /*json trace data*/) |
71 | 77 |
72 // Reply to TracingMsg_GetTraceBufferPercentFull. | 78 // Reply to TracingMsg_GetTraceLogStatus. |
73 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply, | 79 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceLogStatusReply, |
74 float /*trace buffer percent full*/) | 80 base::debug::TraceLogStatus /*status of the trace log*/) |
75 | |
OLD | NEW |