summaryrefslogtreecommitdiffstats
path: root/components/tracing/tracing_messages.h
blob: 25b45bde77cb6bc707842c357026da0f221303e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Multiply-included message header, no traditional include guard.
#include <string>
#include <vector>

#include "base/basictypes.h"
#include "base/sync_socket.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_platform_file.h"

#define IPC_MESSAGE_START TracingMsgStart

// Sent to all child processes to enable trace event recording.
IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing,
                     std::string /*  category_filter_str */,
                     base::TimeTicks /* browser_time */,
                     int /* base::debug::TraceLog::Options */)

// Sent to all child processes to disable trace event recording.
IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing)

// Sent to all child processes to start monitoring.
IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring,
                     std::string /*  category_filter_str */,
                     base::TimeTicks /* browser_time */,
                     int /* base::debug::TraceLog::Options */)

// Sent to all child processes to stop monitoring..
IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring)

// Sent to all child processes to capture the current monitorint snapshot.
IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot)

// Sent to all child processes to get trace buffer fullness.
IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull)

// Sent to all child processes to set watch event.
IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent,
                     std::string /* category_name */,
                     std::string /* event_name */)

// Sent to all child processes to clear watch event.
IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent)

// Notify the browser that this child process supports tracing.
IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing)

// Reply from child processes acking TracingMsg_EndTracing.
IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck,
                     std::vector<std::string> /* known_categories */)

// Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot.
IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck)

// Sent if the trace buffer becomes full.
IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceNotification,
                     int /* base::debug::TraceLog::Notification */)

// Child processes send back trace data in JSON chunks.
IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected,
                     std::string /*json trace data*/)

// Child processes send back trace data of the current monitoring
// in JSON chunks.
IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected,
                     std::string /*json trace data*/)

// Reply to TracingMsg_GetTraceBufferPercentFull.
IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply,
                     float /*trace buffer percent full*/)