| 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 // This header file defines the set of trace_event macros without specifying | 5 // This header file defines the set of trace_event macros without specifying |
| 6 // how the events actually get collected and stored. If you need to expose trace | 6 // how the events actually get collected and stored. If you need to expose trace |
| 7 // events to some other universe, you can copy-and-paste this file as well as | 7 // events to some other universe, you can copy-and-paste this file as well as |
| 8 // trace_event.h, modifying the macros contained there as necessary for the | 8 // trace_event.h, modifying the macros contained there as necessary for the |
| 9 // target platform. The end result is that multiple libraries can funnel events | 9 // target platform. The end result is that multiple libraries can funnel events |
| 10 // through to a shared trace event collector. | 10 // through to a shared trace event collector. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 #include "base/atomicops.h" | 194 #include "base/atomicops.h" |
| 195 #include "base/debug/trace_event_impl.h" | 195 #include "base/debug/trace_event_impl.h" |
| 196 #include "build/build_config.h" | 196 #include "build/build_config.h" |
| 197 | 197 |
| 198 // By default, const char* argument values are assumed to have long-lived scope | 198 // By default, const char* argument values are assumed to have long-lived scope |
| 199 // and will not be copied. Use this macro to force a const char* to be copied. | 199 // and will not be copied. Use this macro to force a const char* to be copied. |
| 200 #define TRACE_STR_COPY(str) \ | 200 #define TRACE_STR_COPY(str) \ |
| 201 trace_event_internal::TraceStringWithCopy(str) | 201 trace_event_internal::TraceStringWithCopy(str) |
| 202 | 202 |
| 203 // This will mark the trace event as disabled by default. The user will need |
| 204 // to explicitly enable the event. |
| 205 #define TRACE_DISABLED_BY_DEFAULT(name) "disabled-by-default-" name |
| 206 |
| 203 // By default, uint64 ID argument values are not mangled with the Process ID in | 207 // By default, uint64 ID argument values are not mangled with the Process ID in |
| 204 // TRACE_EVENT_ASYNC macros. Use this macro to force Process ID mangling. | 208 // TRACE_EVENT_ASYNC macros. Use this macro to force Process ID mangling. |
| 205 #define TRACE_ID_MANGLE(id) \ | 209 #define TRACE_ID_MANGLE(id) \ |
| 206 trace_event_internal::TraceID::ForceMangle(id) | 210 trace_event_internal::TraceID::ForceMangle(id) |
| 207 | 211 |
| 208 // By default, pointers are mangled with the Process ID in TRACE_EVENT_ASYNC | 212 // By default, pointers are mangled with the Process ID in TRACE_EVENT_ASYNC |
| 209 // macros. Use this macro to prevent Process ID mangling. | 213 // macros. Use this macro to prevent Process ID mangling. |
| 210 #define TRACE_ID_DONT_MANGLE(id) \ | 214 #define TRACE_ID_DONT_MANGLE(id) \ |
| 211 trace_event_internal::TraceID::DontMangle(id) | 215 trace_event_internal::TraceID::DontMangle(id) |
| 212 | 216 |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 const char* name_; | 1333 const char* name_; |
| 1330 IDType id_; | 1334 IDType id_; |
| 1331 | 1335 |
| 1332 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1336 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1333 }; | 1337 }; |
| 1334 | 1338 |
| 1335 } // namespace debug | 1339 } // namespace debug |
| 1336 } // namespace base | 1340 } // namespace base |
| 1337 | 1341 |
| 1338 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ | 1342 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ |
| OLD | NEW |