| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 // Multiply-included message header, no traditional include guard. | |
| 6 | |
| 7 #include <stdint.h> | |
| 8 | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/metrics/histogram.h" | |
| 13 #include "base/sync_socket.h" | |
| 14 #include "base/trace_event/memory_dump_request_args.h" | |
| 15 #include "base/trace_event/trace_event_impl.h" | |
| 16 #include "components/tracing/tracing_export.h" | |
| 17 #include "ipc/ipc_channel_handle.h" | |
| 18 #include "ipc/ipc_message_macros.h" | |
| 19 #include "ipc/ipc_message_utils.h" | |
| 20 #include "ipc/ipc_platform_file.h" | |
| 21 | |
| 22 #undef IPC_MESSAGE_EXPORT | |
| 23 #define IPC_MESSAGE_EXPORT TRACING_EXPORT | |
| 24 #define IPC_MESSAGE_START TracingMsgStart | |
| 25 | |
| 26 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus) | |
| 27 IPC_STRUCT_TRAITS_MEMBER(event_capacity) | |
| 28 IPC_STRUCT_TRAITS_MEMBER(event_count) | |
| 29 IPC_STRUCT_TRAITS_END() | |
| 30 | |
| 31 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpRequestArgs) | |
| 32 IPC_STRUCT_TRAITS_MEMBER(dump_guid) | |
| 33 IPC_STRUCT_TRAITS_MEMBER(dump_type) | |
| 34 IPC_STRUCT_TRAITS_MEMBER(level_of_detail) | |
| 35 IPC_STRUCT_TRAITS_END() | |
| 36 | |
| 37 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpArgs) | |
| 38 IPC_STRUCT_TRAITS_MEMBER(level_of_detail) | |
| 39 IPC_STRUCT_TRAITS_END() | |
| 40 | |
| 41 IPC_ENUM_TRAITS_MAX_VALUE(base::trace_event::MemoryDumpLevelOfDetail, | |
| 42 base::trace_event::MemoryDumpLevelOfDetail::LAST) | |
| 43 | |
| 44 IPC_ENUM_TRAITS_MAX_VALUE( | |
| 45 base::trace_event::MemoryDumpType, | |
| 46 static_cast<int>(base::trace_event::MemoryDumpType::LAST)) | |
| 47 | |
| 48 // Sent to all child processes to enable trace event recording. | |
| 49 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, | |
| 50 std::string /* trace_config_str */, | |
| 51 base::TimeTicks /* browser_time */, | |
| 52 uint64_t /* Tracing process id (hash of child id) */) | |
| 53 | |
| 54 // Sent to all child processes to disable trace event recording. | |
| 55 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) | |
| 56 | |
| 57 // Sent to all child processes to cancel trace event recording. | |
| 58 IPC_MESSAGE_CONTROL0(TracingMsg_CancelTracing) | |
| 59 | |
| 60 // Sent to all child processes to get trace buffer fullness. | |
| 61 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus) | |
| 62 | |
| 63 // Sent to all child processes to set watch event. | |
| 64 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, | |
| 65 std::string /* category_name */, | |
| 66 std::string /* event_name */) | |
| 67 | |
| 68 // Sent to all child processes to clear watch event. | |
| 69 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) | |
| 70 | |
| 71 // Sent to all child processes to request a local (current process) memory dump. | |
| 72 IPC_MESSAGE_CONTROL1(TracingMsg_ProcessMemoryDumpRequest, | |
| 73 base::trace_event::MemoryDumpRequestArgs) | |
| 74 | |
| 75 // Reply to TracingHostMsg_GlobalMemoryDumpRequest, sent by the browser process. | |
| 76 // This is to get the result of a global dump initiated by a child process. | |
| 77 IPC_MESSAGE_CONTROL2(TracingMsg_GlobalMemoryDumpResponse, | |
| 78 uint64_t /* dump_guid */, | |
| 79 bool /* success */) | |
| 80 | |
| 81 IPC_MESSAGE_CONTROL4(TracingMsg_SetUMACallback, | |
| 82 std::string /* histogram_name */, | |
| 83 base::HistogramBase::Sample /* histogram_lower_value */, | |
| 84 base::HistogramBase::Sample /* histogram_uppwer_value */, | |
| 85 bool /* repeat */) | |
| 86 | |
| 87 IPC_MESSAGE_CONTROL1(TracingMsg_ClearUMACallback, | |
| 88 std::string /* histogram_name */) | |
| 89 | |
| 90 // Sent everytime when a watch event is matched. | |
| 91 IPC_MESSAGE_CONTROL0(TracingHostMsg_WatchEventMatched) | |
| 92 | |
| 93 // Notify the browser that this child process supports tracing. | |
| 94 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) | |
| 95 | |
| 96 // Reply from child processes acking TracingMsg_EndTracing. | |
| 97 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, | |
| 98 std::vector<std::string> /* known_categories */) | |
| 99 | |
| 100 // Child processes send back trace data in JSON chunks. | |
| 101 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, | |
| 102 std::string /*json trace data*/) | |
| 103 | |
| 104 // Reply to TracingMsg_GetTraceLogStatus. | |
| 105 IPC_MESSAGE_CONTROL1( | |
| 106 TracingHostMsg_TraceLogStatusReply, | |
| 107 base::trace_event::TraceLogStatus /*status of the trace log*/) | |
| 108 | |
| 109 // Sent to the browser to initiate a global memory dump from a child process. | |
| 110 IPC_MESSAGE_CONTROL1(TracingHostMsg_GlobalMemoryDumpRequest, | |
| 111 base::trace_event::MemoryDumpRequestArgs) | |
| 112 | |
| 113 // Reply to TracingMsg_ProcessMemoryDumpRequest. | |
| 114 IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse, | |
| 115 uint64_t /* dump_guid */, | |
| 116 bool /* success */) | |
| 117 | |
| 118 IPC_MESSAGE_CONTROL1(TracingHostMsg_TriggerBackgroundTrace, | |
| 119 std::string /* name */) | |
| 120 | |
| 121 IPC_MESSAGE_CONTROL0(TracingHostMsg_AbortBackgroundTrace) | |
| OLD | NEW |