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

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

Issue 2406703002: tracing: remove sampling state profiler (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 | « base/BUILD.gn ('k') | base/trace_event/trace_config.h » ('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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ 251 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
252 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \ 252 TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \
253 arg2_name, arg2_val) 253 arg2_name, arg2_val)
254 254
255 #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \ 255 #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \
256 timestamp) \ 256 timestamp) \
257 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ 257 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
258 TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \ 258 TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \
259 TRACE_EVENT_FLAG_NONE | scope) 259 TRACE_EVENT_FLAG_NONE | scope)
260 260
261 // Syntactic sugars for the sampling tracing in the main thread.
262 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \
263 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name)
264 #define TRACE_EVENT_GET_SAMPLING_STATE() \
265 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0)
266 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \
267 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name)
268 #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(category_and_name) \
269 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, category_and_name)
270
271 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 261 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2
272 // associated arguments. If the category is not enabled, then this 262 // associated arguments. If the category is not enabled, then this
273 // does nothing. 263 // does nothing.
274 // - category and name strings must have application lifetime (statics or 264 // - category and name strings must have application lifetime (statics or
275 // literals). They may not include " chars. 265 // literals). They may not include " chars.
276 #define TRACE_EVENT_BEGIN0(category_group, name) \ 266 #define TRACE_EVENT_BEGIN0(category_group, name) \
277 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ 267 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
278 TRACE_EVENT_FLAG_NONE) 268 TRACE_EVENT_FLAG_NONE)
279 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ 269 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \
280 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ 270 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1064
1075 // Enum reflecting the scope of an INSTANT event. Must fit within 1065 // Enum reflecting the scope of an INSTANT event. Must fit within
1076 // TRACE_EVENT_FLAG_SCOPE_MASK. 1066 // TRACE_EVENT_FLAG_SCOPE_MASK.
1077 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1067 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1078 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1068 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1079 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1069 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1080 1070
1081 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1071 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1082 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1072 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1083 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1073 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/trace_event/trace_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698