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

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

Issue 18333010: make it possible to disable internal tracing in unofficial builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 | build/common.gypi » ('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 (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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // literals). They may not include " chars. 221 // literals). They may not include " chars.
222 #define TRACE_EVENT0(category_group, name) \ 222 #define TRACE_EVENT0(category_group, name) \
223 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name) 223 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name)
224 #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ 224 #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
225 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val) 225 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val)
226 #define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \ 226 #define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \
227 arg2_val) \ 227 arg2_val) \
228 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \ 228 INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \
229 arg2_name, arg2_val) 229 arg2_name, arg2_val)
230 230
231 // Same as TRACE_EVENT except that they are not included in official builds. 231 // UNSHIPPED_TRACE_EVENT* are like TRACE_EVENT* except that they are not
232 #ifdef OFFICIAL_BUILD 232 // included in official builds.
233
234 #if OFFICIAL_BUILD
235 #undef TRACING_IS_OFFICIAL_BUILD
236 #define TRACING_IS_OFFICIAL_BUILD 1
237 #elif !defined(TRACING_IS_OFFICIAL_BUILD)
238 #define TRACING_IS_OFFICIAL_BUILD 0
239 #endif
240
241 #if TRACING_IS_OFFICIAL_BUILD
233 #define UNSHIPPED_TRACE_EVENT0(category_group, name) (void)0 242 #define UNSHIPPED_TRACE_EVENT0(category_group, name) (void)0
234 #define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ 243 #define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
235 (void)0 244 (void)0
236 #define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \ 245 #define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \
237 arg2_name, arg2_val) (void)0 246 arg2_name, arg2_val) (void)0
238 #define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) (void)0 247 #define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) (void)0
239 #define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, \ 248 #define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, \
240 arg1_name, arg1_val) (void)0 249 arg1_name, arg1_val) (void)0
241 #define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, \ 250 #define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, \
242 arg1_name, arg1_val, \ 251 arg1_name, arg1_val, \
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 const char* name_; 1540 const char* name_;
1532 IDType id_; 1541 IDType id_;
1533 1542
1534 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1543 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1535 }; 1544 };
1536 1545
1537 } // namespace debug 1546 } // namespace debug
1538 } // namespace base 1547 } // namespace base
1539 1548
1540 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ 1549 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698