OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project 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 SRC_TRACING_TRACE_EVENT_H_ | 5 #ifndef SRC_TRACING_TRACE_EVENT_H_ |
6 #define SRC_TRACING_TRACE_EVENT_H_ | 6 #define SRC_TRACING_TRACE_EVENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // void TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( | 100 // void TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( |
101 // const uint8_t* category_group_enabled, | 101 // const uint8_t* category_group_enabled, |
102 // const char* name, | 102 // const char* name, |
103 // uint64_t id) | 103 // uint64_t id) |
104 #define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION \ | 104 #define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION \ |
105 v8::internal::tracing::TraceEventHelper::GetCurrentPlatform() \ | 105 v8::internal::tracing::TraceEventHelper::GetCurrentPlatform() \ |
106 ->UpdateTraceEventDuration | 106 ->UpdateTraceEventDuration |
107 | 107 |
108 // Defines atomic operations used internally by the tracing system. | 108 // Defines atomic operations used internally by the tracing system. |
109 #define TRACE_EVENT_API_ATOMIC_WORD v8::base::AtomicWord | 109 #define TRACE_EVENT_API_ATOMIC_WORD v8::base::AtomicWord |
110 #define TRACE_EVENT_API_ATOMIC_LOAD(var) v8::base::NoBarrier_Load(&(var)) | 110 #define TRACE_EVENT_API_ATOMIC_LOAD(var) v8::base::Relaxed_Load(&(var)) |
111 #define TRACE_EVENT_API_ATOMIC_STORE(var, value) \ | 111 #define TRACE_EVENT_API_ATOMIC_STORE(var, value) \ |
112 v8::base::NoBarrier_Store(&(var), (value)) | 112 v8::base::Relaxed_Store(&(var), (value)) |
113 | 113 |
114 //////////////////////////////////////////////////////////////////////////////// | 114 //////////////////////////////////////////////////////////////////////////////// |
115 | 115 |
116 // Implementation detail: trace event macros create temporary variables | 116 // Implementation detail: trace event macros create temporary variables |
117 // to keep instrumentation overhead low. These macros give each temporary | 117 // to keep instrumentation overhead low. These macros give each temporary |
118 // variable a unique name based on the line number to prevent name collisions. | 118 // variable a unique name based on the line number to prevent name collisions. |
119 #define INTERNAL_TRACE_EVENT_UID3(a, b) trace_event_unique_##a##b | 119 #define INTERNAL_TRACE_EVENT_UID3(a, b) trace_event_unique_##a##b |
120 #define INTERNAL_TRACE_EVENT_UID2(a, b) INTERNAL_TRACE_EVENT_UID3(a, b) | 120 #define INTERNAL_TRACE_EVENT_UID2(a, b) INTERNAL_TRACE_EVENT_UID3(a, b) |
121 #define INTERNAL_TRACE_EVENT_UID(name_prefix) \ | 121 #define INTERNAL_TRACE_EVENT_UID(name_prefix) \ |
122 INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) | 122 INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 bool has_parent_scope_; | 591 bool has_parent_scope_; |
592 Data* p_data_; | 592 Data* p_data_; |
593 Data data_; | 593 Data data_; |
594 }; | 594 }; |
595 | 595 |
596 } // namespace tracing | 596 } // namespace tracing |
597 } // namespace internal | 597 } // namespace internal |
598 } // namespace v8 | 598 } // namespace v8 |
599 | 599 |
600 #endif // SRC_TRACING_TRACE_EVENT_H_ | 600 #endif // SRC_TRACING_TRACE_EVENT_H_ |
OLD | NEW |