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

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

Issue 2861223002: Add TRACE_EVENT_INSTANT_WITH_TIMESTAMP1. (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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 #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP1(category_group, name, scope, \
262 timestamp, arg_name, arg_val) \
263 INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
264 TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \
265 TRACE_EVENT_FLAG_NONE | scope, arg_name, arg_val)
266
261 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 267 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2
262 // associated arguments. If the category is not enabled, then this 268 // associated arguments. If the category is not enabled, then this
263 // does nothing. 269 // does nothing.
264 // - category and name strings must have application lifetime (statics or 270 // - category and name strings must have application lifetime (statics or
265 // literals). They may not include " chars. 271 // literals). They may not include " chars.
266 #define TRACE_EVENT_BEGIN0(category_group, name) \ 272 #define TRACE_EVENT_BEGIN0(category_group, name) \
267 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ 273 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
268 TRACE_EVENT_FLAG_NONE) 274 TRACE_EVENT_FLAG_NONE)
269 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ 275 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \
270 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ 276 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1070
1065 // Enum reflecting the scope of an INSTANT event. Must fit within 1071 // Enum reflecting the scope of an INSTANT event. Must fit within
1066 // TRACE_EVENT_FLAG_SCOPE_MASK. 1072 // TRACE_EVENT_FLAG_SCOPE_MASK.
1067 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1073 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1068 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1074 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1069 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1075 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1070 1076
1071 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1077 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1072 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1078 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1073 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1079 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698