-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling RuntimeEventSource in NativeAOT #85424
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsFor a CI check
|
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterPayload.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Exception.NativeAot.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Exception.NativeAot.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml
Outdated
Show resolved
Hide resolved
df98b45
to
9c204cd
Compare
…LR exceptioncount fix
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
Outdated
Show resolved
Hide resolved
…tion/Assembly.NativeAot.cs Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// track count for metrics | ||
if (isFirstFrame && !isFirstRethrowFrame) | ||
Interlocked.Increment(ref s_exceptionCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to assume this matches how CoreCLR counts these wrt rethrow or ExceptionDispatchInfo.Throw
.
RuntimeEventSource
wasn't enabled in NativeAOT due to not being initialized whenEventSourceEnabled
is set, missing metadata on critical payload types blocking reflection of these inEventSource
.Added a module initializer to Initialize
RuntimeEventSource
ifEventSourceEnabled
is set, made the required types visible to reflection, and also enabled some missing counters inNativeAOT
.