Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / components / tracing / tracing_messages.h
blobd9ba630fc5cbf42e877cb5b7de6e90eec03ec02f
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
3 // found in the LICENSE file.
5 // Multiply-included message header, no traditional include guard.
6 #include <string>
7 #include <vector>
9 #include "base/basictypes.h"
10 #include "base/sync_socket.h"
11 #include "base/trace_event/memory_dump_request_args.h"
12 #include "base/trace_event/trace_event_impl.h"
13 #include "ipc/ipc_channel_handle.h"
14 #include "ipc/ipc_message_macros.h"
15 #include "ipc/ipc_message_utils.h"
16 #include "ipc/ipc_platform_file.h"
18 #define IPC_MESSAGE_START TracingMsgStart
20 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus)
21 IPC_STRUCT_TRAITS_MEMBER(event_capacity)
22 IPC_STRUCT_TRAITS_MEMBER(event_count)
23 IPC_STRUCT_TRAITS_END()
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()
30 IPC_ENUM_TRAITS_MAX_VALUE(
31 base::trace_event::MemoryDumpType,
32 static_cast<int>(base::trace_event::MemoryDumpType::LAST))
34 // Sent to all child processes to enable trace event recording.
35 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing,
36 std::string /* category_filter_str */,
37 base::TimeTicks /* browser_time */,
38 std::string /* base::trace_event::TraceOptions */)
40 // Sent to all child processes to disable trace event recording.
41 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing)
43 // Sent to all child processes to start monitoring.
44 IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring,
45 std::string /* category_filter_str */,
46 base::TimeTicks /* browser_time */,
47 std::string /* base::trace_event::TraceOptions */)
49 // Sent to all child processes to stop monitoring.
50 IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring)
52 // Sent to all child processes to capture the current monitorint snapshot.
53 IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot)
55 // Sent to all child processes to get trace buffer fullness.
56 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus)
58 // Sent to all child processes to set watch event.
59 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent,
60 std::string /* category_name */,
61 std::string /* event_name */)
63 // Sent to all child processes to clear watch event.
64 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent)
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)
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 */)
76 // Sent everytime when a watch event is matched.
77 IPC_MESSAGE_CONTROL0(TracingHostMsg_WatchEventMatched)
79 // Notify the browser that this child process supports tracing.
80 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing)
82 // Reply from child processes acking TracingMsg_EndTracing.
83 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck,
84 std::vector<std::string> /* known_categories */)
86 // Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot.
87 IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck)
89 // Child processes send back trace data in JSON chunks.
90 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected,
91 std::string /*json trace data*/)
93 // Child processes send back trace data of the current monitoring
94 // in JSON chunks.
95 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected,
96 std::string /*json trace data*/)
98 // Reply to TracingMsg_GetTraceLogStatus.
99 IPC_MESSAGE_CONTROL1(
100 TracingHostMsg_TraceLogStatusReply,
101 base::trace_event::TraceLogStatus /*status of the trace log*/)
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)
107 // Reply to TracingMsg_ProcessMemoryDumpRequest.
108 IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse,
109 uint64 /* dump_guid */,
110 bool /* success */)