Skip to content
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

NativeAOT EventPipe library needs to work correctly when EventSource support is enabled #82231

Closed
LakshanF opened this issue Feb 16, 2023 · 3 comments
Assignees
Milestone

Comments

@LakshanF
Copy link
Member

LakshanF commented Feb 16, 2023

In NativeAOT, EventPipe library is not included by default in applications due to size considerations. This means that when applications enable EventSource support, developers have a choice to include this library as shown in the table here. .NET applications do not have this option since EventPipe library is always included in .NET.

There could be cases where developer might just want to get in-proc events and do not need to enable EventPipe library since they do not need these events sent out-proc (to listening clients like dotnet-trace) or want to keep their application size small while getting some event data. Currently in NativeAOT, the only option for EventSource support is also to include EventPipe library. This is due to existing code that is shared with CoreCLR do not distinguish between managed/native separation when EventSource support is enabled and calls the EventPipe library.

We need to do the following in NativeAOT

  1. Pick the right default for EventPipe library support when EventSource support is enabled.
  2. Fix the existing issue when EventSource is enabled and EventPipe is disabled. The work should also include the current code we have that assumes EventPipe can be disabled when EventSource is enabled. For example, removing methods in DisabledEventPipeInternal.cpp
@LakshanF LakshanF added this to the 8.0.0 milestone Feb 16, 2023
@LakshanF LakshanF self-assigned this Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

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

Issue Details

In NativeAOT, EventPipe library is not included by default in applications due to size considerations. This means that when applications enable EventSource support, developers have a choice to include this library as shown in the table here. .NET applications do not have this option since EventPipe library is always included in .NET.

There could be cases where developer might just want to get in-proc events and do not need to enable EventPipe library since they do not need these events sent out-proc (to listening clients like dotnet-trace) or want to keep their application size small while getting some event data. Currently in NativeAOT, the only option for EventSource support is also to include EventPipe library. This is due to existing code that is shared with CoreCLR do not distinguish between managed/native separation when EventSource support is enabled and calls the EventPipe library.

We need to do the following in NativeAOT

  1. Pick the right default for EventPipe library support when EventSource support is enabled.
  2. Fix the existing issue when EventSource is enabled and EventPipe is disabled
Author: LakshanF
Assignees: LakshanF
Labels:

area-NativeAOT-coreclr

Milestone: 8.0.0

@LakshanF
Copy link
Member Author

LakshanF commented Aug 9, 2023

We are not planning to separate EventPipe library support between managed and native code. PR #90274 will remove the EventPipe specific property.

@agocke
Copy link
Member

agocke commented Aug 18, 2023

Closed as completed.

@agocke agocke closed this as completed Aug 18, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

2 participants