| 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ | 921 name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ |
| 922 arg1_val) | 922 arg1_val) |
| 923 #define TRACE_EVENT_COPY_FLOW_END2(category_group, name, id, arg1_name, \ | 923 #define TRACE_EVENT_COPY_FLOW_END2(category_group, name, id, arg1_name, \ |
| 924 arg1_val, arg2_name, arg2_val) \ | 924 arg1_val, arg2_name, arg2_val) \ |
| 925 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ | 925 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ |
| 926 name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ | 926 name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ |
| 927 arg1_val, arg2_name, arg2_val) | 927 arg1_val, arg2_name, arg2_val) |
| 928 | 928 |
| 929 // Special trace event macro to trace task execution with the location where it | 929 // Special trace event macro to trace task execution with the location where it |
| 930 // was posted from. | 930 // was posted from. |
| 931 #define TRACE_TASK_EXECUTION(run_function, task) \ | 931 #define TRACE_TASK_EXECUTION(run_function, task) \ |
| 932 TRACE_EVENT2("toplevel", run_function, "src_file", \ | 932 INTERNAL_TRACE_TASK_EXECUTION(run_function, task) |
| 933 (task).posted_from.file_name(), "src_func", \ | |
| 934 (task).posted_from.function_name()); \ | |
| 935 TRACE_EVENT_API_SCOPED_TASK_EXECUTION_EVENT INTERNAL_TRACE_EVENT_UID( \ | |
| 936 task_event)((task).posted_from.file_name()); | |
| 937 | 933 |
| 938 // TRACE_EVENT_METADATA* events are information related to other | 934 // TRACE_EVENT_METADATA* events are information related to other |
| 939 // injected events, not events in their own right. | 935 // injected events, not events in their own right. |
| 940 #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ | 936 #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ |
| 941 INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) | 937 INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) |
| 942 | 938 |
| 943 // Records a clock sync event. | 939 // Records a clock sync event. |
| 944 #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ | 940 #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ |
| 945 INTERNAL_TRACE_EVENT_ADD( \ | 941 INTERNAL_TRACE_EVENT_ADD( \ |
| 946 TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \ | 942 TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \ |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 | 1084 |
| 1089 // Enum reflecting the scope of an INSTANT event. Must fit within | 1085 // Enum reflecting the scope of an INSTANT event. Must fit within |
| 1090 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1086 // TRACE_EVENT_FLAG_SCOPE_MASK. |
| 1091 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1087 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
| 1092 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1088 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
| 1093 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1089 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
| 1094 | 1090 |
| 1095 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1091 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
| 1096 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1092 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
| 1097 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1093 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
| OLD | NEW |