| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name) | 226 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name) |
| 227 #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ | 227 #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ |
| 228 INTERNAL_TRACE_MEMORY(category_group, name) \ | 228 INTERNAL_TRACE_MEMORY(category_group, name) \ |
| 229 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val) | 229 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val) |
| 230 #define TRACE_EVENT2( \ | 230 #define TRACE_EVENT2( \ |
| 231 category_group, name, arg1_name, arg1_val, arg2_name, arg2_val) \ | 231 category_group, name, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 232 INTERNAL_TRACE_MEMORY(category_group, name) \ | 232 INTERNAL_TRACE_MEMORY(category_group, name) \ |
| 233 INTERNAL_TRACE_EVENT_ADD_SCOPED( \ | 233 INTERNAL_TRACE_EVENT_ADD_SCOPED( \ |
| 234 category_group, name, arg1_name, arg1_val, arg2_name, arg2_val) | 234 category_group, name, arg1_name, arg1_val, arg2_name, arg2_val) |
| 235 | 235 |
| 236 // Records events like TRACE_EVENT2 but uses |memory_tag| for memory tracing. |
| 237 // Use this where |name| is too generic to accurately aggregate allocations. |
| 238 #define TRACE_EVENT_WITH_MEMORY_TAG2( \ |
| 239 category, name, memory_tag, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 240 INTERNAL_TRACE_MEMORY(category, memory_tag) \ |
| 241 INTERNAL_TRACE_EVENT_ADD_SCOPED( \ |
| 242 category, name, arg1_name, arg1_val, arg2_name, arg2_val) |
| 243 |
| 236 // UNSHIPPED_TRACE_EVENT* are like TRACE_EVENT* except that they are not | 244 // UNSHIPPED_TRACE_EVENT* are like TRACE_EVENT* except that they are not |
| 237 // included in official builds. | 245 // included in official builds. |
| 238 | 246 |
| 239 #if OFFICIAL_BUILD | 247 #if OFFICIAL_BUILD |
| 240 #undef TRACING_IS_OFFICIAL_BUILD | 248 #undef TRACING_IS_OFFICIAL_BUILD |
| 241 #define TRACING_IS_OFFICIAL_BUILD 1 | 249 #define TRACING_IS_OFFICIAL_BUILD 1 |
| 242 #elif !defined(TRACING_IS_OFFICIAL_BUILD) | 250 #elif !defined(TRACING_IS_OFFICIAL_BUILD) |
| 243 #define TRACING_IS_OFFICIAL_BUILD 0 | 251 #define TRACING_IS_OFFICIAL_BUILD 0 |
| 244 #endif | 252 #endif |
| 245 | 253 |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 const char* name_; | 1541 const char* name_; |
| 1534 IDType id_; | 1542 IDType id_; |
| 1535 | 1543 |
| 1536 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1544 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1537 }; | 1545 }; |
| 1538 | 1546 |
| 1539 } // namespace debug | 1547 } // namespace debug |
| 1540 } // namespace base | 1548 } // namespace base |
| 1541 | 1549 |
| 1542 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ | 1550 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ |
| OLD | NEW |