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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 #define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \ | 302 #define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \ |
303 arg1_val) \ | 303 arg1_val) \ |
304 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ | 304 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ |
305 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val) | 305 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val) |
306 #define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \ | 306 #define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \ |
307 arg1_val, arg2_name, arg2_val) \ | 307 arg1_val, arg2_name, arg2_val) \ |
308 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ | 308 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ |
309 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \ | 309 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \ |
310 arg2_name, arg2_val) | 310 arg2_name, arg2_val) |
311 | 311 |
| 312 #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \ |
| 313 timestamp) \ |
| 314 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 315 TRACE_EVENT_PHASE_INSTANT, category_group, name, 0, 0, timestamp, \ |
| 316 TRACE_EVENT_FLAG_NONE | scope) |
| 317 |
312 // Syntactic sugars for the sampling tracing in the main thread. | 318 // Syntactic sugars for the sampling tracing in the main thread. |
313 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ | 319 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ |
314 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) | 320 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) |
315 #define TRACE_EVENT_GET_SAMPLING_STATE() \ | 321 #define TRACE_EVENT_GET_SAMPLING_STATE() \ |
316 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) | 322 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) |
317 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ | 323 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ |
318 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) | 324 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) |
319 #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ | 325 #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ |
320 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) | 326 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) |
321 | 327 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 | 1045 |
1040 // Enum reflecting the scope of an INSTANT event. Must fit within | 1046 // Enum reflecting the scope of an INSTANT event. Must fit within |
1041 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1047 // TRACE_EVENT_FLAG_SCOPE_MASK. |
1042 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1048 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
1043 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1049 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
1044 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1050 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
1045 | 1051 |
1046 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1052 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
1047 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1053 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
1048 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1054 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
OLD | NEW |