summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Deseyn <tom.deseyn@gmail.com>2017-11-07 20:10:10 +0100
committerBrian Robbins <brianrob@microsoft.com>2017-11-07 20:10:10 +0100
commit0ebac684a3c76c09c731cb53fa68c15444df9255 (patch)
treed0f8621f770c165462a4cb5565496800fe4ae127 /src
parent1d34d1a0817c0222c765b801b089b701bdae3613 (diff)
downloadcoreclr-0ebac684a3c76c09c731cb53fa68c15444df9255.tar.gz
coreclr-0ebac684a3c76c09c731cb53fa68c15444df9255.tar.bz2
coreclr-0ebac684a3c76c09c731cb53fa68c15444df9255.zip
Remove XplatEventLogger::IsEventLogging where possible (#14706)
Diffstat (limited to 'src')
-rw-r--r--src/inc/eventtracebase.h4
-rw-r--r--src/scripts/genXplatEventing.py16
2 files changed, 4 insertions, 16 deletions
diff --git a/src/inc/eventtracebase.h b/src/inc/eventtracebase.h
index 1b9dc58790..ad6f97395d 100644
--- a/src/inc/eventtracebase.h
+++ b/src/inc/eventtracebase.h
@@ -109,7 +109,7 @@ enum EtwThreadFlags
#define ETWFireEvent(EventName)
#define ETW_TRACING_INITIALIZED(RegHandle) (TRUE)
-#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventPipeHelper::Enabled() || XplatEventLogger::IsEventLoggingEnabled())
+#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventPipeHelper::Enabled() || EventEnabled##EventDescriptor())
#define ETW_CATEGORY_ENABLED(Context, Level, Keyword) (EventPipeHelper::Enabled() || XplatEventLogger::IsEventLoggingEnabled())
#define ETW_TRACING_ENABLED(Context, EventDescriptor) (EventEnabled##EventDescriptor())
#define ETW_TRACING_CATEGORY_ENABLED(Context, Level, Keyword) (EventPipeHelper::Enabled() || XplatEventLogger::IsEventLoggingEnabled())
@@ -120,7 +120,7 @@ enum EtwThreadFlags
#define ETWFireEvent(EventName)
#define ETW_TRACING_INITIALIZED(RegHandle) (TRUE)
-#define ETW_EVENT_ENABLED(Context, EventDescriptor) (XplatEventLogger::IsEventLoggingEnabled())
+#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventEnabled##EventDescriptor())
#define ETW_CATEGORY_ENABLED(Context, Level, Keyword) (XplatEventLogger::IsEventLoggingEnabled())
#define ETW_TRACING_ENABLED(Context, EventDescriptor) (EventEnabled##EventDescriptor())
#define ETW_TRACING_CATEGORY_ENABLED(Context, Level, Keyword) (XplatEventLogger::IsEventLoggingEnabled())
diff --git a/src/scripts/genXplatEventing.py b/src/scripts/genXplatEventing.py
index 6968d293e9..4c9ce873b7 100644
--- a/src/scripts/genXplatEventing.py
+++ b/src/scripts/genXplatEventing.py
@@ -284,8 +284,7 @@ def generateClrallEvents(eventNodes,allTemplates):
clrallEvents.append(eventName)
clrallEvents.append("() {return ")
clrallEvents.append("EventPipeEventEnabled" + eventName + "() || ")
- clrallEvents.append("(XplatEventLogger::IsEventLoggingEnabled() && EventXplatEnabled")
- clrallEvents.append(eventName+"());}\n\n")
+ clrallEvents.append("EventXplatEnabled" + eventName + "();}\n\n")
#generate FireEtw functions
fnptype = []
fnbody = []
@@ -340,18 +339,7 @@ def generateClrallEvents(eventNodes,allTemplates):
fnbody.append(lindent)
fnbody.append("ULONG status = EventPipeWriteEvent" + eventName + "(" + ''.join(line) + ");\n")
fnbody.append(lindent)
- fnbody.append("if(XplatEventLogger::IsEventLoggingEnabled())\n")
- fnbody.append(lindent)
- fnbody.append("{\n")
- fnbody.append(lindent)
- fnbody.append(lindent)
- fnbody.append("status &= FireEtXplat")
- fnbody.append(eventName)
- fnbody.append("(")
- fnbody.extend(line)
- fnbody.append(");\n")
- fnbody.append(lindent)
- fnbody.append("}\n")
+ fnbody.append("status &= FireEtXplat" + eventName + "(" + ''.join(line) + ");\n")
fnbody.append(lindent)
fnbody.append("return status;\n")
fnbody.append("}\n\n")