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

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

Issue 2385973002: Add TRACE_EVENT_SAMPLE_WITH_ID1 macro. (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 | 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 542 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
543 543
544 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \ 544 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \
545 thread_id, timestamp, \ 545 thread_id, timestamp, \
546 arg1_name, arg1_val, \ 546 arg1_name, arg1_val, \
547 arg2_name, arg2_val) \ 547 arg2_name, arg2_val) \
548 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ 548 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
549 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \ 549 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
550 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) 550 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
551 551
552 #define TRACE_EVENT_SAMPLE_WITH_ID1(category_group, name, id, arg1_name, \
553 arg1_val) \
554 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_SAMPLE, category_group, \
555 name, id, TRACE_EVENT_FLAG_NONE, arg1_name, \
556 arg1_val)
557
552 // ASYNC_STEP_* APIs should be only used by legacy code. New code should 558 // ASYNC_STEP_* APIs should be only used by legacy code. New code should
553 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async 559 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async
554 // event. 560 // event.
555 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 561 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
556 // associated arguments. If the category is not enabled, then this 562 // associated arguments. If the category is not enabled, then this
557 // does nothing. 563 // does nothing.
558 // - category and name strings must have application lifetime (statics or 564 // - category and name strings must have application lifetime (statics or
559 // literals). They may not include " chars. 565 // literals). They may not include " chars.
560 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC 566 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC
561 // events are considered to match if their category_group, name and id values 567 // events are considered to match if their category_group, name and id values
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 1117
1112 // Enum reflecting the scope of an INSTANT event. Must fit within 1118 // Enum reflecting the scope of an INSTANT event. Must fit within
1113 // TRACE_EVENT_FLAG_SCOPE_MASK. 1119 // TRACE_EVENT_FLAG_SCOPE_MASK.
1114 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1120 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1115 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1121 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1116 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1122 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1117 1123
1118 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1124 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1119 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1125 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1120 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1126 #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