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 defines the set of functions necessary for trace_event_internal.h | 5 // This header defines the set of functions necessary for trace_event_internal.h |
6 // to remain platform and context neutral. To use tracing in another context, | 6 // to remain platform and context neutral. To use tracing in another context, |
7 // copy this header (and trace_event_internal.h) and implement the | 7 // copy this header (and trace_event_internal.h) and implement the |
8 // TRACE_EVENT_API_* macros below for the new environment. | 8 // TRACE_EVENT_API_* macros below for the new environment. |
9 | 9 |
10 #ifndef BASE_DEBUG_TRACE_EVENT_H_ | 10 #ifndef BASE_DEBUG_TRACE_EVENT_H_ |
(...skipping 26 matching lines...) Expand all Loading... |
37 // const char* name, | 37 // const char* name, |
38 // unsigned long long id, | 38 // unsigned long long id, |
39 // int num_args, | 39 // int num_args, |
40 // const char** arg_names, | 40 // const char** arg_names, |
41 // const unsigned char* arg_types, | 41 // const unsigned char* arg_types, |
42 // const unsigned long long* arg_values, | 42 // const unsigned long long* arg_values, |
43 // unsigned char flags) | 43 // unsigned char flags) |
44 #define TRACE_EVENT_API_ADD_TRACE_EVENT \ | 44 #define TRACE_EVENT_API_ADD_TRACE_EVENT \ |
45 base::debug::TraceLog::GetInstance()->AddTraceEvent | 45 base::debug::TraceLog::GetInstance()->AddTraceEvent |
46 | 46 |
| 47 // Add a trace event to the platform tracing system. |
| 48 // void TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( |
| 49 // char phase, |
| 50 // const unsigned char* category_enabled, |
| 51 // const char* name, |
| 52 // unsigned long long id, |
| 53 // int thread_id, |
| 54 // const TimeTicks& timestamp, |
| 55 // int num_args, |
| 56 // const char** arg_names, |
| 57 // const unsigned char* arg_types, |
| 58 // const unsigned long long* arg_values, |
| 59 // unsigned char flags) |
| 60 #define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP \ |
| 61 base::debug::TraceLog::GetInstance()->AddTraceEventWithThreadIdAndTimestamp |
| 62 |
47 // Defines atomic operations used internally by the tracing system. | 63 // Defines atomic operations used internally by the tracing system. |
48 #define TRACE_EVENT_API_ATOMIC_WORD base::subtle::AtomicWord | 64 #define TRACE_EVENT_API_ATOMIC_WORD base::subtle::AtomicWord |
49 #define TRACE_EVENT_API_ATOMIC_LOAD(var) base::subtle::NoBarrier_Load(&(var)) | 65 #define TRACE_EVENT_API_ATOMIC_LOAD(var) base::subtle::NoBarrier_Load(&(var)) |
50 #define TRACE_EVENT_API_ATOMIC_STORE(var, value) \ | 66 #define TRACE_EVENT_API_ATOMIC_STORE(var, value) \ |
51 base::subtle::NoBarrier_Store(&(var), (value)) | 67 base::subtle::NoBarrier_Store(&(var), (value)) |
52 | 68 |
53 // Defines visibility for classes in trace_event_internal.h | 69 // Defines visibility for classes in trace_event_internal.h |
54 #define TRACE_EVENT_API_CLASS_EXPORT BASE_EXPORT | 70 #define TRACE_EVENT_API_CLASS_EXPORT BASE_EXPORT |
55 | 71 |
56 //////////////////////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////////////////////// |
57 | 73 |
58 #include "base/debug/trace_event_internal.h" | 74 #include "base/debug/trace_event_internal.h" |
59 | 75 |
60 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ | 76 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ |
OLD | NEW |