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

Unified Diff: base/win/event_trace_provider.h

Issue 23934003: Have all trace points emit to ETW. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/event_trace_provider.h
diff --git a/base/win/event_trace_provider.h b/base/win/event_trace_provider.h
index 7907347b72451607bba2e026b6550e1f457d0e4e..4107ed3c6845dcf79b67aeb3f7f48918928175f7 100644
--- a/base/win/event_trace_provider.h
+++ b/base/win/event_trace_provider.h
@@ -43,6 +43,14 @@ template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
memset(static_cast<Super*>(this), 0, sizeof(Super));
}
+ EtwMofEvent(const EtwEventClass& event_class, EtwEventLevel level) {
+ memset(static_cast<Super*>(this), 0, sizeof(Super));
+ header.Size = sizeof(Super);
+ header.Guid = event_class;
+ header.Class.Level = level;
+ header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR;
+ }
+
EtwMofEvent(const EtwEventClass& event_class, EtwEventType type,
EtwEventLevel level) {
memset(static_cast<Super*>(this), 0, sizeof(Super));
@@ -64,6 +72,10 @@ template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR;
}
+ void SetType(EtwEventType type) {
+ header.Class.Type = type;
+ }
+
void SetField(int field, size_t size, const void *data) {
// DCHECK(field < N);
if ((field < N) && (size <= kuint32max)) {
« no previous file with comments | « base/debug/trace_event_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698