Skip to content
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
6 changes: 5 additions & 1 deletion src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,17 @@ include_directories(${ARCH_SOURCES_DIR})

if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
set(FEATURE_PERFTRACING 1)
set(FEATURE_EVENT_TRACE 1)
endif()

if(FEATURE_PERFTRACING)
add_definitions(-DFEATURE_PERFTRACING)
endif()

if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE)
endif()

add_definitions(-DFEATURE_BASICFREEZE)
add_definitions(-DFEATURE_CONSERVATIVE_GC)
add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
Expand All @@ -238,7 +243,6 @@ add_definitions(-D_LIB)

if(WIN32)
add_definitions(-DFEATURE_ETW)
add_definitions(-DFEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_SUSPEND_REDIRECTION)
add_definitions(-DFEATURE_SPECIAL_USER_MODE_APC)
else()
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/clretwallmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @TODO: Audit native events in NativeAOT Runtime

#include "clreventpipewriteevents.h"
#include "etwevents.h"
#include "EtwEvents.h"

inline BOOL EventEnabledDestroyGCHandle(void) {return EventPipeEventEnabledDestroyGCHandle();}

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/nativeaot/Runtime/eventtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ inline BOOL ETW::GCLog::ShouldWalkStaticsAndCOMForEtw() { return FALSE; }
inline void ETW::GCLog::FireGcStart(ETW_GC_INFO * pGcInfo) { }
inline void ETW::GCLog::EndHeapDump(ProfilerWalkHeapContext * profilerWalkHeapContext) { }
inline void ETW::GCLog::BeginMovedReferences(size_t * pProfilingContext) { }
inline void ETW::GCLog::MovedReference(BYTE * pbMemBlockStart, BYTE * pbMemBlockEnd, ptrdiff_t cbRelocDistance, size_t profilingContext, BOOL fCompacting) { }
inline void ETW::GCLog::EndMovedReferences(size_t profilingContext) { }
inline void ETW::GCLog::MovedReference(BYTE * pbMemBlockStart, BYTE * pbMemBlockEnd, ptrdiff_t cbRelocDistance, size_t profilingContext, BOOL fCompacting, BOOL fAllowProfApiNotification) { }
inline void ETW::GCLog::EndMovedReferences(size_t profilingContext, BOOL fAllowProfApiNotification) { }
inline void ETW::GCLog::WalkStaticsAndCOMForETW() { }
inline void ETW::GCLog::RootReference(
LPVOID pvHandle,
Expand Down
12 changes: 7 additions & 5 deletions src/coreclr/nativeaot/Runtime/gcenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
#include "gcenv.inl"

#include "stressLog.h"
#ifdef FEATURE_ETW

#ifdef FEATURE_EVENT_TRACE
#ifndef _INC_WINDOWS
typedef void* LPVOID;
typedef uint32_t UINT;
Expand All @@ -58,15 +57,14 @@
#endif // _INC_WINDOWS

#include "clretwallmain.h"
#include "etwevents.h"
#include "eventtrace.h"

#else // FEATURE_ETW
#else // FEATURE_EVENT_TRACE

#include "etmdummy.h"
#define ETW_EVENT_ENABLED(e,f) false

#endif // FEATURE_ETW
#endif // FEATURE_EVENT_TRACE

#define LOG(x)

Expand All @@ -88,7 +86,11 @@ class ArrayBase : Array
EXTERN_C uint32_t _tls_index;
inline uint16_t GetClrInstanceId()
{
#ifdef HOST_WINDOWS
return (uint16_t)_tls_index;
#else
return 0;
#endif
}

class IGCHeap;
Expand Down
19 changes: 0 additions & 19 deletions src/coreclr/nativeaot/Runtime/gcrhenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@
#include "holder.h"
#include "volatile.h"

#ifdef FEATURE_ETW
#ifndef _INC_WINDOWS
typedef void* LPVOID;
typedef uint32_t UINT;
typedef void* PVOID;
typedef uint64_t ULONGLONG;
typedef uint32_t ULONG;
typedef int64_t LONGLONG;
typedef uint8_t BYTE;
typedef uint16_t UINT16;
#endif // _INC_WINDOWS

#include "etwevents.h"
#include "eventtrace.h"
#else // FEATURE_ETW
#include "etmdummy.h"
#define ETW_EVENT_ENABLED(e,f) false
#endif // FEATURE_ETW

GPTR_IMPL(MethodTable, g_pFreeObjectEEType);

#include "gctoclreventsink.h"
Expand Down