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
14 changes: 12 additions & 2 deletions src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ if (WIN32)
windows/PalRedhawkCommon.cpp
windows/PalRedhawkMinWin.cpp
${GC_DIR}/windows/gcenv.windows.cpp
eventtrace.cpp
rheventtrace.cpp
)

list(APPEND FULL_RUNTIME_SOURCES windows/CoffNativeCodeManager.cpp)
Expand Down Expand Up @@ -222,6 +220,18 @@ endif()

if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE)
list(APPEND COMMON_RUNTIME_SOURCES
eventtrace.cpp
)
# These are carry-overs from .NET Native and only included on Windows currently
# bulktype : directly emits via ETW with EventWrite
# gcheap : GCHeapDump, GCHeapSurvivalAndMovement - not prioritizing for nativeaot yet
if (WIN32)
list(APPEND COMMON_RUNTIME_SOURCES
eventtrace_bulktype.cpp
eventtrace_gcheap.cpp
)
endif()
endif()

add_definitions(-DFEATURE_BASICFREEZE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,3 +632,8 @@ ULONG EventPipeWriteEventGCFitBucketInfo(
{
return 0;
}

bool DotNETRuntimeProvider_IsEnabled(unsigned char level, unsigned long long keyword)
{
return false;
}
15 changes: 15 additions & 0 deletions src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3147,3 +3147,18 @@ void InitDotNETRuntime(void)
EventPipeEventGCLOHCompact = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,208,1,0,EP_EVENT_LEVEL_INFORMATIONAL,true);
EventPipeEventGCFitBucketInfo = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,209,1,0,EP_EVENT_LEVEL_VERBOSE,true);
}

bool DotNETRuntimeProvider_IsEnabled(unsigned char level, unsigned long long keyword)
{
if (!EventPipeAdapter::Enabled())
return false;

EVENTPIPE_TRACE_CONTEXT& context = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context.EventPipeProvider;
if (!context.IsEnabled)
return false;

if (level > context.Level)
return false;

return (keyword == (ULONGLONG)0) || (keyword & context.EnabledKeywordsBitmask) != 0;
}
Loading