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

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

Issue 1038453002: Add option to export tracing events to ETW. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thakis@ and thestig@ reviews. Created 5 years, 8 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 (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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 #define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(category_group, name, id, snapshot) \ 821 #define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(category_group, name, id, snapshot) \
822 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, \ 822 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, \
823 category_group, name, TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE,\ 823 category_group, name, TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE,\
824 "snapshot", snapshot) 824 "snapshot", snapshot)
825 825
826 #define TRACE_EVENT_OBJECT_DELETED_WITH_ID(category_group, name, id) \ 826 #define TRACE_EVENT_OBJECT_DELETED_WITH_ID(category_group, name, id) \
827 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_DELETE_OBJECT, \ 827 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_DELETE_OBJECT, \
828 category_group, name, TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE) 828 category_group, name, TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE)
829 829
830 #define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE() \ 830 #define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE() \
831 UNLIKELY(*INTERNAL_TRACE_EVENT_UID(category_group_enabled) & \ 831 UNLIKELY(*INTERNAL_TRACE_EVENT_UID(category_group_enabled) & \
832 (base::trace_event::TraceLog::ENABLED_FOR_RECORDING | \ 832 (base::trace_event::TraceLog::ENABLED_FOR_RECORDING | \
833 base::trace_event::TraceLog::ENABLED_FOR_EVENT_CALLBACK)) 833 base::trace_event::TraceLog::ENABLED_FOR_EVENT_CALLBACK | \
834 base::trace_event::TraceLog::ENABLED_FOR_ETW_EXPORT))
834 835
835 // Macro to efficiently determine if a given category group is enabled. 836 // Macro to efficiently determine if a given category group is enabled.
836 #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \ 837 #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \
837 do { \ 838 do { \
838 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ 839 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
839 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \ 840 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
840 *ret = true; \ 841 *ret = true; \
841 } else { \ 842 } else { \
842 *ret = false; \ 843 *ret = false; \
843 } \ 844 } \
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 const char* name_; 1627 const char* name_;
1627 IDType id_; 1628 IDType id_;
1628 1629
1629 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1630 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1630 }; 1631 };
1631 1632
1632 } // namespace trace_event 1633 } // namespace trace_event
1633 } // namespace base 1634 } // namespace base
1634 1635
1635 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1636 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698