Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Side by Side Diff: base/trace_event/trace_event.h

Issue 1152553011: Allow binding point to be specified on flow end events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unittests for flow events Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)
855 #define TRACE_EVENT_FLOW_END1(category_group, name, id, arg1_name, arg1_val) \ 858 #define TRACE_EVENT_FLOW_END1(category_group, name, id, arg1_name, arg1_val) \
856 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ 859 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \
857 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 860 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
858 #define TRACE_EVENT_FLOW_END2(category_group, name, id, arg1_name, arg1_val, \ 861 #define TRACE_EVENT_FLOW_END2(category_group, name, id, arg1_name, arg1_val, \
859 arg2_name, arg2_val) \ 862 arg2_name, arg2_val) \
860 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ 863 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \
861 category_group, name, id, TRACE_EVENT_FLAG_NONE, \ 864 category_group, name, id, TRACE_EVENT_FLAG_NONE, \
862 arg1_name, arg1_val, arg2_name, arg2_val) 865 arg1_name, arg1_val, arg2_name, arg2_val)
863 #define TRACE_EVENT_COPY_FLOW_END0(category_group, name, id) \ 866 #define TRACE_EVENT_COPY_FLOW_END0(category_group, name, id) \
864 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \ 867 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, \
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') 1133 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v')
1131 1134
1132 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. 1135 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT.
1133 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) 1136 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0))
1134 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) 1137 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0))
1135 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) 1138 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1))
1136 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) 1139 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2))
1137 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3)) 1140 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3))
1138 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4)) 1141 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4))
1139 #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned char>(1 << 5)) 1142 #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))
1140 #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned char>(1 << 6)) 1144 #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned char>(1 << 6))
dsinclair 2015/06/11 15:21:54 This is going to conflict. We have the same value
1141 1145
1142 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ 1146 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \
1143 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA)) 1147 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA))
1144 1148
1145 // Type values for identifying types in the TraceValue union. 1149 // Type values for identifying types in the TraceValue union.
1146 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) 1150 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1))
1147 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) 1151 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2))
1148 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) 1152 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3))
1149 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) 1153 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4))
1150 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) 1154 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5))
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 const char* name_; 1708 const char* name_;
1705 IDType id_; 1709 IDType id_;
1706 1710
1707 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1711 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1708 }; 1712 };
1709 1713
1710 } // namespace trace_event 1714 } // namespace trace_event
1711 } // namespace base 1715 } // namespace base
1712 1716
1713 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1717 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/trace_event_impl.cc » ('j') | base/trace_event/trace_event_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698