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/sync_socket.h" | 10 #include "base/sync_socket.h" |
11 #include "ipc/ipc_channel_handle.h" | 11 #include "ipc/ipc_channel_handle.h" |
12 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
13 #include "ipc/ipc_message_utils.h" | 13 #include "ipc/ipc_message_utils.h" |
14 #include "ipc/ipc_platform_file.h" | 14 #include "ipc/ipc_platform_file.h" |
15 | 15 |
16 #define IPC_MESSAGE_START TracingMsgStart | 16 #define IPC_MESSAGE_START TracingMsgStart |
17 | 17 |
18 // Sent to all child processes to enable trace event recording. | 18 // Sent to all child processes to enable trace event recording. |
19 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, | 19 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, |
20 std::string /* category_filter_str */, | 20 std::string /* category_filter_str */, |
21 base::TimeTicks /* browser_time */, | 21 base::TimeTicks /* browser_time */, |
22 int /* base::debug::TraceLog::Options */) | 22 int /* base::debug::TraceLog::Options */) |
23 | 23 |
24 // Sent to all child processes to disable trace event recording. | 24 // Sent to all child processes to disable trace event recording. |
25 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) | 25 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) |
26 | 26 |
| 27 // Sent to all child processes to start continuous sampling tracing. |
| 28 IPC_MESSAGE_CONTROL1(TracingMsg_BeginContinuousSamplingTracing, |
| 29 base::TimeTicks /* browser_time */) |
| 30 |
| 31 // Sent to all child processes to stop continuous sampling tracing. |
| 32 IPC_MESSAGE_CONTROL0(TracingMsg_EndContinuousSamplingTracing) |
| 33 |
| 34 // Sent to all child processes to dump a result of continuous sampling tracing. |
| 35 IPC_MESSAGE_CONTROL0(TracingMsg_ShowContinuousSamplingTracing) |
| 36 |
27 // Sent to all child processes to get trace buffer fullness. | 37 // Sent to all child processes to get trace buffer fullness. |
28 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull) | 38 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull) |
29 | 39 |
30 // Sent to all child processes to set watch event. | 40 // Sent to all child processes to set watch event. |
31 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, | 41 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, |
32 std::string /* category_name */, | 42 std::string /* category_name */, |
33 std::string /* event_name */) | 43 std::string /* event_name */) |
34 | 44 |
35 // Sent to all child processes to clear watch event. | 45 // Sent to all child processes to clear watch event. |
36 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) | 46 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) |
37 | 47 |
38 // Notify the browser that this child process supports tracing. | 48 // Notify the browser that this child process supports tracing. |
39 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) | 49 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) |
40 | 50 |
41 // Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). | 51 // Reply from child processes acking TracingMsg_EndTracing. |
42 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, | 52 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, |
43 std::vector<std::string> /* known_categories */) | 53 std::vector<std::string> /* known_categories */) |
44 | 54 |
| 55 // Reply from child processes acking TracingMsg_ShowContinuousSamplingTracing. |
| 56 IPC_MESSAGE_CONTROL0(TracingHostMsg_ShowContinuousSamplingTracingAck) |
| 57 |
45 // Sent if the trace buffer becomes full. | 58 // Sent if the trace buffer becomes full. |
46 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceNotification, | 59 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceNotification, |
47 int /* base::debug::TraceLog::Notification */) | 60 int /* base::debug::TraceLog::Notification */) |
48 | 61 |
49 // Child processes send trace data back in JSON chunks. | 62 // Child processes send trace data back in JSON chunks. |
50 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, | 63 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, |
51 std::string /*json trace data*/) | 64 std::string /*json trace data*/) |
52 | 65 |
| 66 // Child processes send trace data of continuous sampling tracing back |
| 67 // in JSON chunks. |
| 68 IPC_MESSAGE_CONTROL1(TracingHostMsg_ContinuousSamplingTraceDataCollected, |
| 69 std::string /*json trace data*/) |
| 70 |
53 // Reply to TracingMsg_GetTraceBufferPercentFull. | 71 // Reply to TracingMsg_GetTraceBufferPercentFull. |
54 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply, | 72 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply, |
55 float /*trace buffer percent full*/) | 73 float /*trace buffer percent full*/) |
56 | 74 |
OLD | NEW |