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

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

Issue 1254463002: media: Always enable trace event for "media" category group. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 5 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 | media/base/media.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \ 910 #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \
911 do { \ 911 do { \
912 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ 912 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
913 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \ 913 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
914 *ret = true; \ 914 *ret = true; \
915 } else { \ 915 } else { \
916 *ret = false; \ 916 *ret = false; \
917 } \ 917 } \
918 } while (0) 918 } while (0)
919 919
920 // Macro to explicitly warm up a given category group. This could be useful in
921 // cases where we want to initialize a category group before any trace events
922 // for that category group is reported. For example, to have a category group
923 // always show up in the "record categories" list for manually selecting
924 // settings in about://tracing.
925 #define TRACE_EVENT_WARMUP_CATEGORY(category_group) \
926 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group)
927
920 // Macro to efficiently determine, through polling, if a new trace has begun. 928 // Macro to efficiently determine, through polling, if a new trace has begun.
921 #define TRACE_EVENT_IS_NEW_TRACE(ret) \ 929 #define TRACE_EVENT_IS_NEW_TRACE(ret) \
922 do { \ 930 do { \
923 static int INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = 0; \ 931 static int INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = 0; \
924 int num_traces_recorded = TRACE_EVENT_API_GET_NUM_TRACES_RECORDED(); \ 932 int num_traces_recorded = TRACE_EVENT_API_GET_NUM_TRACES_RECORDED(); \
925 if (num_traces_recorded != -1 && \ 933 if (num_traces_recorded != -1 && \
926 num_traces_recorded != \ 934 num_traces_recorded != \
927 INTERNAL_TRACE_EVENT_UID(lastRecordingNumber)) { \ 935 INTERNAL_TRACE_EVENT_UID(lastRecordingNumber)) { \
928 INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = \ 936 INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = \
929 num_traces_recorded; \ 937 num_traces_recorded; \
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 const char* name_; 1754 const char* name_;
1747 IDType id_; 1755 IDType id_;
1748 1756
1749 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1757 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1750 }; 1758 };
1751 1759
1752 } // namespace trace_event 1760 } // namespace trace_event
1753 } // namespace base 1761 } // namespace base
1754 1762
1755 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1763 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/media.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698