Skip to content

Commit

Permalink
Fix ARM32 on ARM64 Tracing (dotnet#17417)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianrob authored Apr 4, 2018
1 parent 9f41675 commit dd4bd31
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/inc/eventtracebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ enum EtwThreadFlags
#define ETWFireEvent(EventName)

#define ETW_TRACING_INITIALIZED(RegHandle) (TRUE)
#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventPipeHelper::Enabled() || EventEnabled##EventDescriptor())
#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventPipeHelper::Enabled() || XplatEventLogger::IsEventLoggingEnabled())
#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())
Expand All @@ -111,7 +111,7 @@ enum EtwThreadFlags
#define ETWFireEvent(EventName)

#define ETW_TRACING_INITIALIZED(RegHandle) (TRUE)
#define ETW_EVENT_ENABLED(Context, EventDescriptor) (EventEnabled##EventDescriptor())
#define ETW_EVENT_ENABLED(Context, EventDescriptor) (XplatEventLogger::IsEventLoggingEnabled())
#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())
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/genEventPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def generateEventPipeImplFiles(
return false;
}}
*(T *)(buffer + offset) = value;
memcpy(buffer + offset, (char *)&value, sizeof(T));
offset += sizeof(T);
return true;
}}
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/genEventing.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def generateClrallEvents(eventNodes,allTemplates):
clrallEvents.append(eventName)
clrallEvents.append("() {return ")
clrallEvents.append("EventPipeEventEnabled" + eventName + "() || ")
clrallEvents.append("EventXplatEnabled" + eventName + "();}\n\n")
clrallEvents.append("(XplatEventLogger::IsEventLoggingEnabled() && EventXplatEnabled" + eventName + "());}\n\n")
#generate FireEtw functions
fnptype = []
fnbody = []
Expand Down Expand Up @@ -815,4 +815,4 @@ def main(argv):

if __name__ == '__main__':
return_code = main(sys.argv[1:])
sys.exit(return_code)
sys.exit(return_code)
2 changes: 1 addition & 1 deletion src/scripts/genLttngProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def generateLttngFiles(etwmanifest,eventprovider_directory):
return false;
}
*(T *)(buffer + offset) = value;
memcpy(buffer + offset, (char *)&value, sizeof(T));
offset += sizeof(T);
return true;
}
Expand Down

0 comments on commit dd4bd31

Please sign in to comment.