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

Commit

Permalink
Enable XplatEventLogger on all non-Windows platforms
Browse files Browse the repository at this point in the history
Because on non-Windows platform, we assume event tracing, we also requires
it to compile native code for non-Windows platform.
Event tracing is only enabled on AMD64 devices for now on Unix platforms.
  • Loading branch information
Manu committed Apr 18, 2016
1 parent 83e52fa commit c2c077f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,12 @@ endif()
if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_PLATFORM_ARCH_AMD64)
set(FEATURE_EVENT_TRACE 1)
endif()
if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE=1)
endif()
if(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
endif()

if(CLR_CMAKE_PLATFORM_UNIX)
add_subdirectory(src/ToolBox/SOS/lldbplugin)
Expand Down Expand Up @@ -823,12 +829,6 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
endif(CLR_CMAKE_PLATFORM_UNIX)
if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE=1)
if(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
endif(CLR_CMAKE_PLATFORM_UNIX)
endif(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EXCEPTIONDISPATCHINFO)
# NetBSD doesn't implement this feature
if(NOT CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
Expand Down
5 changes: 1 addition & 4 deletions clr.coreclr.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,9 @@
<FeatureSvrGc Condition="'$(TargetArch)' != 'arm'">true</FeatureSvrGc>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsLinux)' == 'true'">
<FeatureXplatEventSource>true</FeatureXplatEventSource>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
<FeaturePal>true</FeaturePal>
<FeatureXplatEventSource>true</FeatureXplatEventSource>

<FeatureStubsAsIL>true</FeatureStubsAsIL>

Expand Down
6 changes: 5 additions & 1 deletion src/vm/eventtracepriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,13 @@ class BulkStaticsLogger
class XplatEventSourceLogger
{
public:
#ifdef FEATURE_EVENT_TRACE
static void QCALLTYPE LogEventSource(__in_z int eventID, __in_z LPCWSTR eventName, __in_z LPCWSTR eventSourceName, __in_z LPCWSTR payload);

static BOOL QCALLTYPE IsEventSourceLoggingEnabled();
#else
static void QCALLTYPE LogEventSource(__in_z int eventID, __in_z LPCWSTR eventName, __in_z LPCWSTR eventSourceName, __in_z LPCWSTR payload) {}
static BOOL QCALLTYPE IsEventSourceLoggingEnabled() { return false; }
#endif
};

#endif //defined(FEATURE_EVENTSOURCE_XPLAT)

0 comments on commit c2c077f

Please sign in to comment.