OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ | 352 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ |
353 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ | 353 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ |
354 TRACE_EVENT_FLAG_NONE) | 354 TRACE_EVENT_FLAG_NONE) |
355 | 355 |
356 #define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \ | 356 #define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \ |
357 arg1_name, arg1_val) \ | 357 arg1_name, arg1_val) \ |
358 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ | 358 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ |
359 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ | 359 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ |
360 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) | 360 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
361 | 361 |
| 362 #define TRACE_EVENT_MARK_WITH_TIMESTAMP2( \ |
| 363 category_group, name, timestamp, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 364 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ |
| 365 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ |
| 366 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) |
| 367 |
362 #define TRACE_EVENT_COPY_MARK(category_group, name) \ | 368 #define TRACE_EVENT_COPY_MARK(category_group, name) \ |
363 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ | 369 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ |
364 TRACE_EVENT_FLAG_COPY) | 370 TRACE_EVENT_FLAG_COPY) |
365 | 371 |
366 #define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \ | 372 #define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \ |
367 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ | 373 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ |
368 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ | 374 TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \ |
369 TRACE_EVENT_FLAG_COPY) | 375 TRACE_EVENT_FLAG_COPY) |
370 | 376 |
371 // Similar to TRACE_EVENT_ENDx but with a custom |at| timestamp provided. | 377 // Similar to TRACE_EVENT_ENDx but with a custom |at| timestamp provided. |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 | 1076 |
1071 // Enum reflecting the scope of an INSTANT event. Must fit within | 1077 // Enum reflecting the scope of an INSTANT event. Must fit within |
1072 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1078 // TRACE_EVENT_FLAG_SCOPE_MASK. |
1073 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1079 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
1074 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1080 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
1075 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1081 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
1076 | 1082 |
1077 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1083 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
1078 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1084 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
1079 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1085 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
OLD | NEW |