Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[3.1 port] Fix LTTng build for build environments with older liblttng-ust-dev #27294

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/scripts/genLttngProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,10 @@ def generateLttngFiles(etwmanifest,eventprovider_directory, dryRun):
lttngimpl_file.write("#include \"" + lttngevntheadershortname + "\"\n\n")

lttngimpl_file.write("""#ifndef tracepoint_enabled
#define tracepoint_enabled(provider, name) FALSE
extern "C" bool XplatEventLoggerIsEnabled();
#define tracepoint_enabled(provider, name) XplatEventLoggerIsEnabled()
#define do_tracepoint tracepoint
#endif
Expand Down
8 changes: 8 additions & 0 deletions src/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7541,3 +7541,11 @@ bool EventPipeHelper::IsEnabled(DOTNET_TRACE_CONTEXT Context, UCHAR Level, ULONG
return false;
}
#endif // FEATURE_PERFTRACING

#if defined(FEATURE_PAL) && defined(FEATURE_PERFTRACING)
// This is a wrapper method for LTTng. See https://github.com/dotnet/coreclr/pull/27273 for details.
extern "C" bool XplatEventLoggerIsEnabled()
{
return XplatEventLogger::IsEventLoggingEnabled();
}
#endif // FEATURE_PAL && FEATURE_PERFTRACING