| 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 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_H_ | 5 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| 6 #define BASE_TRACE_EVENT_TRACE_EVENT_H_ | 6 #define BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| 7 | 7 |
| 8 // This header file defines implementation details of how the trace macros in | 8 // This header file defines implementation details of how the trace macros in |
| 9 // trace_event_common.h collect and store trace events. Anything not | 9 // trace_event_common.h collect and store trace events. Anything not |
| 10 // implementation-specific should go in trace_macros_common.h instead of here. | 10 // implementation-specific should go in trace_macros_common.h instead of here. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // unsigned int TRACE_EVENT_API_GET_NUM_TRACES_RECORDED() | 90 // unsigned int TRACE_EVENT_API_GET_NUM_TRACES_RECORDED() |
| 91 #define TRACE_EVENT_API_GET_NUM_TRACES_RECORDED \ | 91 #define TRACE_EVENT_API_GET_NUM_TRACES_RECORDED \ |
| 92 base::trace_event::TraceLog::GetInstance()->GetNumTracesRecorded | 92 base::trace_event::TraceLog::GetInstance()->GetNumTracesRecorded |
| 93 | 93 |
| 94 // Add a trace event to the platform tracing system. | 94 // Add a trace event to the platform tracing system. |
| 95 // base::trace_event::TraceEventHandle TRACE_EVENT_API_ADD_TRACE_EVENT( | 95 // base::trace_event::TraceEventHandle TRACE_EVENT_API_ADD_TRACE_EVENT( |
| 96 // char phase, | 96 // char phase, |
| 97 // const unsigned char* category_group_enabled, | 97 // const unsigned char* category_group_enabled, |
| 98 // const char* name, | 98 // const char* name, |
| 99 // unsigned long long id, | 99 // unsigned long long id, |
| 100 // unsigned long long context_id, | |
| 101 // int num_args, | 100 // int num_args, |
| 102 // const char** arg_names, | 101 // const char** arg_names, |
| 103 // const unsigned char* arg_types, | 102 // const unsigned char* arg_types, |
| 104 // const unsigned long long* arg_values, | 103 // const unsigned long long* arg_values, |
| 104 // const scoped_refptr<ConvertableToTraceFormat>* |
| 105 // convertable_values, |
| 105 // unsigned int flags) | 106 // unsigned int flags) |
| 106 #define TRACE_EVENT_API_ADD_TRACE_EVENT \ | 107 #define TRACE_EVENT_API_ADD_TRACE_EVENT \ |
| 107 base::trace_event::TraceLog::GetInstance()->AddTraceEvent | 108 base::trace_event::TraceLog::GetInstance()->AddTraceEvent |
| 108 | 109 |
| 109 // Add a trace event to the platform tracing system. | 110 // Add a trace event to the platform tracing system. |
| 110 // base::trace_event::TraceEventHandle | 111 // base::trace_event::TraceEventHandle |
| 111 // TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_CONTEXT_ID( | 112 // TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_CONTEXT_ID( |
| 112 // char phase, | 113 // char phase, |
| 113 // const unsigned char* category_group_enabled, | 114 // const unsigned char* category_group_enabled, |
| 114 // const char* name, | 115 // const char* name, |
| 115 // unsigned long long id, | 116 // unsigned long long id, |
| 116 // unsigned long long context_id, | 117 // unsigned long long context_id, |
| 117 // int num_args, | 118 // int num_args, |
| 118 // const char** arg_names, | 119 // const char** arg_names, |
| 119 // const unsigned char* arg_types, | 120 // const unsigned char* arg_types, |
| 120 // const unsigned long long* arg_values, | 121 // const unsigned long long* arg_values, |
| 122 // const scoped_refptr<ConvertableToTraceFormat>* |
| 123 // convertable_values, |
| 121 // unsigned int flags) | 124 // unsigned int flags) |
| 122 #define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_CONTEXT_ID \ | 125 #define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_CONTEXT_ID \ |
| 123 base::trace_event::TraceLog::GetInstance()->AddTraceEventWithContextId | 126 base::trace_event::TraceLog::GetInstance()->AddTraceEventWithContextId |
| 124 | 127 |
| 125 // Add a trace event to the platform tracing system. | 128 // Add a trace event to the platform tracing system. |
| 126 // base::trace_event::TraceEventHandle | 129 // base::trace_event::TraceEventHandle |
| 127 // TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( | 130 // TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( |
| 128 // char phase, | 131 // char phase, |
| 129 // const unsigned char* category_group_enabled, | 132 // const unsigned char* category_group_enabled, |
| 130 // const char* name, | 133 // const char* name, |
| 131 // unsigned long long id, | 134 // unsigned long long id, |
| 132 // unsigned long long context_id, | 135 // unsigned long long context_id, |
| 133 // int thread_id, | 136 // int thread_id, |
| 134 // const TraceTicks& timestamp, | 137 // const TraceTicks& timestamp, |
| 135 // int num_args, | 138 // int num_args, |
| 136 // const char** arg_names, | 139 // const char** arg_names, |
| 137 // const unsigned char* arg_types, | 140 // const unsigned char* arg_types, |
| 138 // const unsigned long long* arg_values, | 141 // const unsigned long long* arg_values, |
| 142 // const scoped_refptr<ConvertableToTraceFormat>* |
| 143 // convertable_values, |
| 139 // unsigned int flags) | 144 // unsigned int flags) |
| 140 #define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP \ | 145 #define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP \ |
| 141 base::trace_event::TraceLog::GetInstance() \ | 146 base::trace_event::TraceLog::GetInstance() \ |
| 142 ->AddTraceEventWithThreadIdAndTimestamp | 147 ->AddTraceEventWithThreadIdAndTimestamp |
| 143 | 148 |
| 144 // Set the duration field of a COMPLETE trace event. | 149 // Set the duration field of a COMPLETE trace event. |
| 145 // void TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( | 150 // void TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( |
| 146 // const unsigned char* category_group_enabled, | 151 // const unsigned char* category_group_enabled, |
| 147 // const char* name, | 152 // const char* name, |
| 148 // base::trace_event::TraceEventHandle id) | 153 // base::trace_event::TraceEventHandle id) |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 const char* name_; | 860 const char* name_; |
| 856 IDType id_; | 861 IDType id_; |
| 857 | 862 |
| 858 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 863 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 859 }; | 864 }; |
| 860 | 865 |
| 861 } // namespace trace_event | 866 } // namespace trace_event |
| 862 } // namespace base | 867 } // namespace base |
| 863 | 868 |
| 864 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 869 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| OLD | NEW |