| 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/metrics/histogram.h" |   10 #include "base/metrics/histogram.h" | 
|   11 #include "base/sync_socket.h" |   11 #include "base/sync_socket.h" | 
|   12 #include "base/trace_event/memory_dump_request_args.h" |   12 #include "base/trace_event/memory_dump_request_args.h" | 
|   13 #include "base/trace_event/trace_event_impl.h" |   13 #include "base/trace_event/trace_event_impl.h" | 
|   14 #include "components/tracing/tracing_export.h" |   14 #include "components/tracing/tracing_export.h" | 
|   15 #include "ipc/ipc_channel_handle.h" |   15 #include "ipc/ipc_channel_handle.h" | 
|   16 #include "ipc/ipc_message_macros.h" |   16 #include "ipc/ipc_message_macros.h" | 
|   17 #include "ipc/ipc_message_utils.h" |   17 #include "ipc/ipc_message_utils.h" | 
|   18 #include "ipc/ipc_platform_file.h" |   18 #include "ipc/ipc_platform_file.h" | 
|   19  |   19  | 
|   20 #undef IPC_MESSAGE_EXPORT |   20 #undef IPC_MESSAGE_EXPORT | 
|   21 #define IPC_MESSAGE_EXPORT TRACING_EXPORT |   21 #define IPC_MESSAGE_EXPORT TRACING_EXPORT | 
|   22 #define IPC_MESSAGE_START TracingMsgStart |   22 #define IPC_MESSAGE_START TracingMsgStart | 
|   23  |   23  | 
|   24 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus) |   24 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::TraceLogStatus) | 
|   25 IPC_STRUCT_TRAITS_MEMBER(event_capacity) |   25   IPC_STRUCT_TRAITS_MEMBER(event_capacity) | 
|   26 IPC_STRUCT_TRAITS_MEMBER(event_count) |   26   IPC_STRUCT_TRAITS_MEMBER(event_count) | 
|   27 IPC_STRUCT_TRAITS_END() |   27 IPC_STRUCT_TRAITS_END() | 
|   28  |   28  | 
 |   29 IPC_STRUCT_BEGIN(TracingMsg_MemoryTracingInfo) | 
 |   30   IPC_STRUCT_MEMBER(uint64, tracing_process_id) | 
 |   31   IPC_STRUCT_MEMBER(IPC::PlatformFileForTransit, smaps_fd) | 
 |   32   IPC_STRUCT_MEMBER(IPC::PlatformFileForTransit, status_fd) | 
 |   33 IPC_STRUCT_END() | 
 |   34  | 
|   29 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpRequestArgs) |   35 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpRequestArgs) | 
|   30 IPC_STRUCT_TRAITS_MEMBER(dump_guid) |   36   IPC_STRUCT_TRAITS_MEMBER(dump_guid) | 
|   31 IPC_STRUCT_TRAITS_MEMBER(dump_type) |   37   IPC_STRUCT_TRAITS_MEMBER(dump_type) | 
|   32 IPC_STRUCT_TRAITS_MEMBER(level_of_detail) |   38   IPC_STRUCT_TRAITS_MEMBER(level_of_detail) | 
|   33 IPC_STRUCT_TRAITS_END() |   39 IPC_STRUCT_TRAITS_END() | 
|   34  |   40  | 
|   35 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpArgs) |   41 IPC_STRUCT_TRAITS_BEGIN(base::trace_event::MemoryDumpArgs) | 
|   36   IPC_STRUCT_TRAITS_MEMBER(level_of_detail) |   42   IPC_STRUCT_TRAITS_MEMBER(level_of_detail) | 
|   37 IPC_STRUCT_TRAITS_END() |   43 IPC_STRUCT_TRAITS_END() | 
|   38  |   44  | 
|   39 IPC_ENUM_TRAITS_MAX_VALUE(base::trace_event::MemoryDumpLevelOfDetail, |   45 IPC_ENUM_TRAITS_MAX_VALUE(base::trace_event::MemoryDumpLevelOfDetail, | 
|   40                           base::trace_event::MemoryDumpLevelOfDetail::LAST) |   46                           base::trace_event::MemoryDumpLevelOfDetail::LAST) | 
|   41  |   47  | 
|   42 IPC_ENUM_TRAITS_MAX_VALUE( |   48 IPC_ENUM_TRAITS_MAX_VALUE( | 
|   43     base::trace_event::MemoryDumpType, |   49     base::trace_event::MemoryDumpType, | 
|   44     static_cast<int>(base::trace_event::MemoryDumpType::LAST)) |   50     static_cast<int>(base::trace_event::MemoryDumpType::LAST)) | 
|   45  |   51  | 
|   46 // Sent to all child processes to enable trace event recording. |   52 // Sent to all child processes to enable trace event recording. | 
|   47 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, |   53 IPC_MESSAGE_CONTROL3( | 
|   48                      std::string /*  trace_config_str */, |   54     TracingMsg_BeginTracing, | 
|   49                      base::TraceTicks /* browser_time */, |   55     std::string /*  trace_config_str */, | 
|   50                      uint64 /* Tracing process id (hash of child id) */) |   56     base::TraceTicks /* browser_time */, | 
 |   57     TracingMsg_MemoryTracingInfo /* child process' memory tracing info */) | 
|   51  |   58  | 
|   52 // Sent to all child processes to disable trace event recording. |   59 // Sent to all child processes to disable trace event recording. | 
|   53 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) |   60 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) | 
|   54  |   61  | 
|   55 // Sent to all child processes to cancel trace event recording. |   62 // Sent to all child processes to cancel trace event recording. | 
|   56 IPC_MESSAGE_CONTROL0(TracingMsg_CancelTracing) |   63 IPC_MESSAGE_CONTROL0(TracingMsg_CancelTracing) | 
|   57  |   64  | 
|   58 // Sent to all child processes to start monitoring. |   65 // Sent to all child processes to start monitoring. | 
|   59 IPC_MESSAGE_CONTROL2(TracingMsg_EnableMonitoring, |   66 IPC_MESSAGE_CONTROL2(TracingMsg_EnableMonitoring, | 
|   60                      std::string /*  trace_config_str */, |   67                      std::string /*  trace_config_str */, | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  126 IPC_MESSAGE_CONTROL1(TracingHostMsg_GlobalMemoryDumpRequest, |  133 IPC_MESSAGE_CONTROL1(TracingHostMsg_GlobalMemoryDumpRequest, | 
|  127                      base::trace_event::MemoryDumpRequestArgs) |  134                      base::trace_event::MemoryDumpRequestArgs) | 
|  128  |  135  | 
|  129 // Reply to TracingMsg_ProcessMemoryDumpRequest. |  136 // Reply to TracingMsg_ProcessMemoryDumpRequest. | 
|  130 IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse, |  137 IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse, | 
|  131                      uint64 /* dump_guid */, |  138                      uint64 /* dump_guid */, | 
|  132                      bool /* success */) |  139                      bool /* success */) | 
|  133  |  140  | 
|  134 IPC_MESSAGE_CONTROL1(TracingHostMsg_TriggerBackgroundTrace, |  141 IPC_MESSAGE_CONTROL1(TracingHostMsg_TriggerBackgroundTrace, | 
|  135                      std::string /* name */) |  142                      std::string /* name */) | 
| OLD | NEW |