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_event_common.h instead of here. | 10 // implementation-specific should go in trace_event_common.h instead of here. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 trace_event_internal::TraceEventSamplingStateScope<bucket_number> \ | 69 trace_event_internal::TraceEventSamplingStateScope<bucket_number> \ |
70 traceEventSamplingScope(category "\0" name); | 70 traceEventSamplingScope(category "\0" name); |
71 | 71 |
72 #define TRACE_EVENT_API_CURRENT_THREAD_ID \ | 72 #define TRACE_EVENT_API_CURRENT_THREAD_ID \ |
73 static_cast<int>(base::PlatformThread::CurrentId()) | 73 static_cast<int>(base::PlatformThread::CurrentId()) |
74 | 74 |
75 #define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE() \ | 75 #define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE() \ |
76 UNLIKELY(*INTERNAL_TRACE_EVENT_UID(category_group_enabled) & \ | 76 UNLIKELY(*INTERNAL_TRACE_EVENT_UID(category_group_enabled) & \ |
77 (base::trace_event::TraceLog::ENABLED_FOR_RECORDING | \ | 77 (base::trace_event::TraceLog::ENABLED_FOR_RECORDING | \ |
78 base::trace_event::TraceLog::ENABLED_FOR_EVENT_CALLBACK | \ | 78 base::trace_event::TraceLog::ENABLED_FOR_EVENT_CALLBACK | \ |
79 base::trace_event::TraceLog::ENABLED_FOR_ETW_EXPORT)) | 79 base::trace_event::TraceLog::ENABLED_FOR_ETW_EXPORT | \ |
| 80 base::trace_event::TraceLog::ENABLED_FOR_FILTERING)) |
80 | 81 |
81 //////////////////////////////////////////////////////////////////////////////// | 82 //////////////////////////////////////////////////////////////////////////////// |
82 // Implementation specific tracing API definitions. | 83 // Implementation specific tracing API definitions. |
83 | 84 |
84 // Get a pointer to the enabled state of the given trace category. Only | 85 // Get a pointer to the enabled state of the given trace category. Only |
85 // long-lived literal strings should be given as the category group. The | 86 // long-lived literal strings should be given as the category group. The |
86 // returned pointer can be held permanently in a local static for example. If | 87 // returned pointer can be held permanently in a local static for example. If |
87 // the unsigned char is non-zero, tracing is enabled. If tracing is enabled, | 88 // the unsigned char is non-zero, tracing is enabled. If tracing is enabled, |
88 // TRACE_EVENT_API_ADD_TRACE_EVENT can be called. It's OK if tracing is disabled | 89 // TRACE_EVENT_API_ADD_TRACE_EVENT can be called. It's OK if tracing is disabled |
89 // between the load of the tracing state and the call to | 90 // between the load of the tracing state and the call to |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 const char* name_; | 1104 const char* name_; |
1104 IDType id_; | 1105 IDType id_; |
1105 | 1106 |
1106 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1107 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1107 }; | 1108 }; |
1108 | 1109 |
1109 } // namespace trace_event | 1110 } // namespace trace_event |
1110 } // namespace base | 1111 } // namespace base |
1111 | 1112 |
1112 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1113 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
OLD | NEW |