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

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

Issue 2397373003: tracing: remove UNSHIPPED_TRACE_EVENT (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/android/compositor/compositor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 #define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \ 216 #define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \
217 arg2_val) \ 217 arg2_val) \
218 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \ 218 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \
219 arg2_name, arg2_val) 219 arg2_name, arg2_val)
220 #define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \ 220 #define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \
221 arg1_name, arg1_val, arg2_name, arg2_val) \ 221 arg1_name, arg1_val, arg2_name, arg2_val) \
222 INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ 222 INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
223 flow_flags, arg1_name, arg1_val, \ 223 flow_flags, arg1_name, arg1_val, \
224 arg2_name, arg2_val) 224 arg2_name, arg2_val)
225 225
226 // UNSHIPPED_TRACE_EVENT* are like TRACE_EVENT* except that they are not
227 // included in official builds.
228
229 #if OFFICIAL_BUILD
230 #undef TRACING_IS_OFFICIAL_BUILD
231 #define TRACING_IS_OFFICIAL_BUILD 1
232 #elif !defined(TRACING_IS_OFFICIAL_BUILD)
233 #define TRACING_IS_OFFICIAL_BUILD 0
234 #endif
235
236 #if TRACING_IS_OFFICIAL_BUILD
237 #define UNSHIPPED_TRACE_EVENT0(category_group, name) (void)0
238 #define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
239 (void)0
240 #define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \
241 arg2_name, arg2_val) \
242 (void)0
243 #define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) (void)0
244 #define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, \
245 arg1_val) \
246 (void)0
247 #define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, \
248 arg1_val, arg2_name, arg2_val) \
249 (void)0
250 #else
251 #define UNSHIPPED_TRACE_EVENT0(category_group, name) \
252 TRACE_EVENT0(category_group, name)
253 #define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
254 TRACE_EVENT1(category_group, name, arg1_name, arg1_val)
255 #define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \
256 arg2_name, arg2_val) \
257 TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, arg2_val)
258 #define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) \
259 TRACE_EVENT_INSTANT0(category_group, name, scope)
260 #define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, \
261 arg1_val) \
262 TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val)
263 #define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, \
264 arg1_val, arg2_name, arg2_val) \
265 TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \
266 arg2_name, arg2_val)
267 #endif
268
269 // Records a single event called "name" immediately, with 0, 1 or 2 226 // Records a single event called "name" immediately, with 0, 1 or 2
270 // associated arguments. If the category is not enabled, then this 227 // associated arguments. If the category is not enabled, then this
271 // does nothing. 228 // does nothing.
272 // - category and name strings must have application lifetime (statics or 229 // - category and name strings must have application lifetime (statics or
273 // literals). They may not include " chars. 230 // literals). They may not include " chars.
274 #define TRACE_EVENT_INSTANT0(category_group, name, scope) \ 231 #define TRACE_EVENT_INSTANT0(category_group, name, scope) \
275 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ 232 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
276 TRACE_EVENT_FLAG_NONE | scope) 233 TRACE_EVENT_FLAG_NONE | scope)
277 #define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \ 234 #define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \
278 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ 235 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1074
1118 // Enum reflecting the scope of an INSTANT event. Must fit within 1075 // Enum reflecting the scope of an INSTANT event. Must fit within
1119 // TRACE_EVENT_FLAG_SCOPE_MASK. 1076 // TRACE_EVENT_FLAG_SCOPE_MASK.
1120 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1077 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1121 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1078 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1122 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1079 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1123 1080
1124 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1081 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1125 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1082 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1126 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1083 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/compositor/compositor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698