Skip to content

Enabling RuntimeEventSource in NativeAOT - #85424

Merged
LakshanF merged 11 commits into
dotnet:mainfrom
LakshanF:EnableCountersInEventPipe
May 11, 2023
Merged

Enabling RuntimeEventSource in NativeAOT#85424
LakshanF merged 11 commits into
dotnet:mainfrom
LakshanF:EnableCountersInEventPipe

Conversation

@LakshanF

@LakshanFLakshanF commented Apr 26, 2023

Copy link
Copy Markdown
Contributor

RuntimeEventSource wasn't enabled in NativeAOT due to not being initialized when EventSourceEnabled is set, missing metadata on critical payload types blocking reflection of these in EventSource.

Added a module initializer to Initialize RuntimeEventSource if EventSourceEnabled is set, made the required types visible to reflection, and also enabled some missing counters in NativeAOT.

@LakshanFLakshanF added this to the 8.0.0 milestone Apr 26, 2023
@LakshanFLakshanF self-assigned this Apr 26, 2023
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

For a CI check

Author:LakshanF
Assignees:LakshanF
Labels:

area-NativeAOT-coreclr

Milestone:8.0.0

@LakshanF
LakshanF marked this pull request as draft April 26, 2023 22:17
@LakshanF
LakshanF requested a review from davmasonApril 26, 2023 22:18
@LakshanF
LakshanF marked this pull request as ready for review April 27, 2023 22:07
@LakshanF
LakshanFforce-pushed the EnableCountersInEventPipe branch from df98b45 to 9c204cdCompareMay 9, 2023 21:02
@ghostghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label May 9, 2023
@ghostghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 9, 2023

@agockeagocke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Comment threadsrc/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs Outdated
@ghostghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label May 10, 2023
…tion/Assembly.NativeAot.cs
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@ghostghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 10, 2023
@runfoapprunfoappBot mentioned this pull request May 10, 2023

@MichalStrehovskyMichalStrehovsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Comment on lines +120 to +122
// track count for metrics
if (isFirstFrame && !isFirstRethrowFrame)
Interlocked.Increment(ref s_exceptionCount);

Copy link
Copy Markdown
Member

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.

@LakshanF
LakshanF merged commit c48716c into dotnet:mainMay 11, 2023
@ghostghost locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@LakshanF@agocke@jkotas@davmason@MichalStrehovsky