| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 trace_event_internal::TraceID::DontMangle(id) | 43 trace_event_internal::TraceID::DontMangle(id) |
| 44 | 44 |
| 45 // By default, trace IDs are eventually converted to a single 64-bit number. Use | 45 // By default, trace IDs are eventually converted to a single 64-bit number. Use |
| 46 // this macro to add a scope string. For example, | 46 // this macro to add a scope string. For example, |
| 47 // | 47 // |
| 48 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( | 48 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( |
| 49 // "network", "ResourceLoad", | 49 // "network", "ResourceLoad", |
| 50 // TRACE_ID_WITH_SCOPE("BlinkResourceID", resourceID)); | 50 // TRACE_ID_WITH_SCOPE("BlinkResourceID", resourceID)); |
| 51 // | 51 // |
| 52 // Also, it is possible to prepend the ID with another number, like the process | 52 // Also, it is possible to prepend the ID with another number, like the process |
| 53 // ID. This is useful in creatin IDs that are unique among all processes. To do | 53 // ID. This is useful in creating IDs that are unique among all processes. To do |
| 54 // that, pass two numbers after the scope string instead of one. For example, | 54 // that, pass two numbers after the scope string instead of one. For example, |
| 55 // | 55 // |
| 56 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( | 56 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( |
| 57 // "network", "ResourceLoad", | 57 // "network", "ResourceLoad", |
| 58 // TRACE_ID_WITH_SCOPE("BlinkResourceID", pid, resourceID)); | 58 // TRACE_ID_WITH_SCOPE("BlinkResourceID", pid, resourceID)); |
| 59 #define TRACE_ID_WITH_SCOPE(scope, ...) \ | 59 #define TRACE_ID_WITH_SCOPE(scope, ...) \ |
| 60 trace_event_internal::TraceID::WithScope(scope, ##__VA_ARGS__) | 60 trace_event_internal::TraceID::WithScope(scope, ##__VA_ARGS__) |
| 61 | 61 |
| 62 #define TRACE_ID_GLOBAL(id) trace_event_internal::TraceID::GlobalId(id) | 62 #define TRACE_ID_GLOBAL(id) trace_event_internal::TraceID::GlobalId(id) |
| 63 #define TRACE_ID_LOCAL(id) trace_event_internal::TraceID::LocalId(id) | 63 #define TRACE_ID_LOCAL(id) trace_event_internal::TraceID::LocalId(id) |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 const char* name_; | 1109 const char* name_; |
| 1110 IDType id_; | 1110 IDType id_; |
| 1111 | 1111 |
| 1112 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1112 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1113 }; | 1113 }; |
| 1114 | 1114 |
| 1115 } // namespace trace_event | 1115 } // namespace trace_event |
| 1116 } // namespace base | 1116 } // namespace base |
| 1117 | 1117 |
| 1118 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1118 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| OLD | NEW |