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

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

Issue 2326483004: Adds missing and removes duplicate tracing macros. (Closed)
Patch Set: 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
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ 767 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
768 category_group, name, id, \ 768 category_group, name, id, \
769 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 769 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
770 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ 770 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \
771 arg1_val, arg2_name, arg2_val) \ 771 arg1_val, arg2_name, arg2_val) \
772 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ 772 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
773 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ 773 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
774 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) 774 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
775 775
776 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, 776 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
777 // with one associated argument. If the category is not enabled, then this 777 // with none, one or two associated argument. If the category is not enabled,
778 // does nothing. 778 // then this does nothing.
779 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT0(category_group, name, id) \
780 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
781 category_group, name, id, \
782 TRACE_EVENT_FLAG_NONE)
783
779 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ 784 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \
780 arg1_name, arg1_val) \ 785 arg1_name, arg1_val) \
781 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ 786 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
782 category_group, name, id, \ 787 category_group, name, id, \
783 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 788 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
784 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, 789
785 // with 2 associated arguments. If the category is not enabled, then this
786 // does nothing.
787 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ 790 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \
788 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ 791 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
789 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ 792 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
790 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ 793 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
791 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) 794 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
792 795
793 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ 796 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \
794 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ 797 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
795 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ 798 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
796 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ 799 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
(...skipping 24 matching lines...) Expand all
821 category_group, name, id, timestamp) \ 824 category_group, name, id, timestamp) \
822 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ 825 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
823 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ 826 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
824 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) 827 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
825 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ 828 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \
826 category_group, name, id, timestamp) \ 829 category_group, name, id, timestamp) \
827 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ 830 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
828 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ 831 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
829 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) 832 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
830 833
831 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
832 // with 2 associated arguments. If the category is not enabled, then this
833 // does nothing.
834 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \
835 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
836 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
837 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
838 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
839
840 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 834 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2
841 // associated arguments. If the category is not enabled, then this 835 // associated arguments. If the category is not enabled, then this
842 // does nothing. 836 // does nothing.
843 // - category and name strings must have application lifetime (statics or 837 // - category and name strings must have application lifetime (statics or
844 // literals). They may not include " chars. 838 // literals). They may not include " chars.
845 // - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW 839 // - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW
846 // events are considered to match if their category_group, name and id values 840 // events are considered to match if their category_group, name and id values
847 // all match. |id| must either be a pointer or an integer value up to 64 bits. 841 // all match. |id| must either be a pointer or an integer value up to 64 bits.
848 // If it's a pointer, the bits will be xored with a hash of the process ID so 842 // If it's a pointer, the bits will be xored with a hash of the process ID so
849 // that the same pointer on two different processes will not collide. 843 // that the same pointer on two different processes will not collide.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 1104
1111 // Enum reflecting the scope of an INSTANT event. Must fit within 1105 // Enum reflecting the scope of an INSTANT event. Must fit within
1112 // TRACE_EVENT_FLAG_SCOPE_MASK. 1106 // TRACE_EVENT_FLAG_SCOPE_MASK.
1113 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1107 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1114 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1108 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1115 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1109 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1116 1110
1117 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1111 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1118 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1112 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1119 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1113 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698