| 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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 arg1_name, arg1_val) \ | 845 arg1_name, arg1_val) \ |
| 846 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ | 846 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ |
| 847 category_group, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \ | 847 category_group, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \ |
| 848 arg1_name, arg1_val) | 848 arg1_name, arg1_val) |
| 849 | 849 |
| 850 // Records a single FLOW_END event for "name" immediately. If the category | 850 // Records a single FLOW_END event for "name" immediately. If the category |
| 851 // is not enabled, then this does nothing. | 851 // is not enabled, then this does nothing. |
| 852 #define TRACE_EVENT_FLOW_END0(category_group, name, id) \ | 852 #define TRACE_EVENT_FLOW_END0(category_group, name, id) \ |
| 853 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ | 853 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ |
| 854 category_group, name, id, TRACE_EVENT_FLAG_NONE) | 854 category_group, name, id, TRACE_EVENT_FLAG_NONE) |
| 855 #define TRACE_EVENT_FLOW_END_BIND_TO_ENCLOSING0(category_group, name, id) \ | |
| 856 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ | |
| 857 category_group, name, id, TRACE_EVENT_FLAG_BIND_TO_ENCLOSING) | |
| 858 #define TRACE_EVENT_FLOW_END1(category_group, name, id, arg1_name, arg1_val) \ | 855 #define TRACE_EVENT_FLOW_END1(category_group, name, id, arg1_name, arg1_val) \ |
| 859 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ | 856 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ |
| 860 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) | 857 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
| 861 #define TRACE_EVENT_FLOW_END2(category_group, name, id, arg1_name, arg1_val, \ | 858 #define TRACE_EVENT_FLOW_END2(category_group, name, id, arg1_name, arg1_val, \ |
| 862 arg2_name, arg2_val) \ | 859 arg2_name, arg2_val) \ |
| 863 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ | 860 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ |
| 864 category_group, name, id, TRACE_EVENT_FLAG_NONE, \ | 861 category_group, name, id, TRACE_EVENT_FLAG_NONE, \ |
| 865 arg1_name, arg1_val, arg2_name, arg2_val) | 862 arg1_name, arg1_val, arg2_name, arg2_val) |
| 866 #define TRACE_EVENT_COPY_FLOW_END0(category_group, name, id) \ | 863 #define TRACE_EVENT_COPY_FLOW_END0(category_group, name, id) \ |
| 867 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ | 864 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') | 1130 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') |
| 1134 | 1131 |
| 1135 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. | 1132 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. |
| 1136 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) | 1133 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) |
| 1137 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) | 1134 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) |
| 1138 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) | 1135 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) |
| 1139 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) | 1136 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) |
| 1140 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3)) | 1137 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3)) |
| 1141 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4)) | 1138 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4)) |
| 1142 #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned char>(1 << 5)) | 1139 #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned char>(1 << 5)) |
| 1143 #define TRACE_EVENT_FLAG_BIND_TO_ENCLOSING (static_cast<unsigned char>(1 << 6)) | |
| 1144 #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned char>(1 << 6)) | 1140 #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned char>(1 << 6)) |
| 1145 | 1141 |
| 1146 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ | 1142 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ |
| 1147 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA)) | 1143 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA)) |
| 1148 | 1144 |
| 1149 // Type values for identifying types in the TraceValue union. | 1145 // Type values for identifying types in the TraceValue union. |
| 1150 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) | 1146 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) |
| 1151 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) | 1147 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) |
| 1152 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) | 1148 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) |
| 1153 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) | 1149 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1708 const char* name_; | 1704 const char* name_; |
| 1709 IDType id_; | 1705 IDType id_; |
| 1710 | 1706 |
| 1711 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1707 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1712 }; | 1708 }; |
| 1713 | 1709 |
| 1714 } // namespace trace_event | 1710 } // namespace trace_event |
| 1715 } // namespace base | 1711 } // namespace base |
| 1716 | 1712 |
| 1717 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1713 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| OLD | NEW |