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

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

Issue 2341333003: Use chromium trace_event implementation in blink (Closed)
Patch Set: Rebase Created 4 years, 3 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 | base/trace_event/trace_event.h » ('j') | base/trace_event/trace_event.h » ('J')
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 TRACE_EVENT_PHASE_INSTANT, category_group, name, 0, 0, timestamp, \ 301 TRACE_EVENT_PHASE_INSTANT, category_group, name, 0, 0, timestamp, \
302 TRACE_EVENT_FLAG_NONE | scope) 302 TRACE_EVENT_FLAG_NONE | scope)
303 303
304 // Syntactic sugars for the sampling tracing in the main thread. 304 // Syntactic sugars for the sampling tracing in the main thread.
305 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ 305 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \
306 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) 306 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name)
307 #define TRACE_EVENT_GET_SAMPLING_STATE() \ 307 #define TRACE_EVENT_GET_SAMPLING_STATE() \
308 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) 308 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0)
309 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ 309 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \
310 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) 310 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name)
311 #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ 311 #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(category_and_name) \
312 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) 312 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, category_and_name)
313 313
314 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 314 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2
315 // associated arguments. If the category is not enabled, then this 315 // associated arguments. If the category is not enabled, then this
316 // does nothing. 316 // does nothing.
317 // - category and name strings must have application lifetime (statics or 317 // - category and name strings must have application lifetime (statics or
318 // literals). They may not include " chars. 318 // literals). They may not include " chars.
319 #define TRACE_EVENT_BEGIN0(category_group, name) \ 319 #define TRACE_EVENT_BEGIN0(category_group, name) \
320 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ 320 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
321 TRACE_EVENT_FLAG_NONE) 321 TRACE_EVENT_FLAG_NONE)
322 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ 322 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TRACE_EVENT_FLAG_COPY) 388 TRACE_EVENT_FLAG_COPY)
389 #define TRACE_EVENT_COPY_END1(category_group, name, arg1_name, arg1_val) \ 389 #define TRACE_EVENT_COPY_END1(category_group, name, arg1_name, arg1_val) \
390 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ 390 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
391 TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) 391 TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
392 #define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \ 392 #define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \
393 arg2_name, arg2_val) \ 393 arg2_name, arg2_val) \
394 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ 394 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
395 TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ 395 TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
396 arg2_name, arg2_val) 396 arg2_name, arg2_val)
397 397
398 #define TRACE_EVENT_MARK_WITH_TIMESTAMP0(category_group, name, timestamp) \
399 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
400 TRACE_EVENT_PHASE_MARK, category_group, name, 0, 0, timestamp, \
401 TRACE_EVENT_FLAG_NONE)
402
398 #define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \ 403 #define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \
399 arg1_name, arg1_val) \ 404 arg1_name, arg1_val) \
400 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ 405 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
401 TRACE_EVENT_PHASE_MARK, category_group, name, 0, 0, timestamp, \ 406 TRACE_EVENT_PHASE_MARK, category_group, name, 0, 0, timestamp, \
402 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 407 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
403 408
404 #define TRACE_EVENT_COPY_MARK(category_group, name) \ 409 #define TRACE_EVENT_COPY_MARK(category_group, name) \
405 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ 410 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \
406 TRACE_EVENT_FLAG_COPY) 411 TRACE_EVENT_FLAG_COPY)
407 412
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 1111
1107 // Enum reflecting the scope of an INSTANT event. Must fit within 1112 // Enum reflecting the scope of an INSTANT event. Must fit within
1108 // TRACE_EVENT_FLAG_SCOPE_MASK. 1113 // TRACE_EVENT_FLAG_SCOPE_MASK.
1109 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1114 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1110 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1115 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1111 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1116 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1112 1117
1113 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1118 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1114 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1119 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1115 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1120 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/trace_event.h » ('j') | base/trace_event/trace_event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698