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

Enable EventPipe when EventSource is enabled #82200

Merged
merged 4 commits into from
Feb 20, 2023

Conversation

LakshanF
Copy link
Contributor

@LakshanF LakshanF commented Feb 15, 2023

Fixes issue #81943. CrossGen2 has EventSourceSupport enabled and needs the EventPipe library in Windows.

@MichalStrehovsky
Copy link
Member

Circling back to the discussion in #80382 (comment).

If EventSource doesn't work without enabling event pipe, shouldn't EventSourceSupport then enable event pipe? It doesn't look right that <EventSourceSupport>true</EventSourceSupport> is producing broken apps.

@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

Fixes issue #81943. CrossGen2 has EventSourceSupport enabled and needs the EventPipe library in Windows.

Author: LakshanF
Assignees: LakshanF
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member

The libraries tests that are broken since eventpipe merged also enable eventsource so it's probably the same issue:

#82022 (comment)

I'd like to do something with those failing tests because it's noise and we tend to regress things worse once there's noise (old issue) that we can't distinguish from signal (newly introduced issue).

@LakshanF
Copy link
Contributor Author

The libraries tests that are broken since eventpipe merged also enable eventsource so it's probably the same issue:

#82022 (comment)

I'd like to do something with those failing tests because it's noise and we tend to regress things worse once there's noise (old issue) that we can't distinguish from signal (newly introduced issue).

Created #82231 to track this

@MichalStrehovsky
Copy link
Member

The libraries tests that are broken since eventpipe merged also enable eventsource so it's probably the same issue:
#82022 (comment)
I'd like to do something with those failing tests because it's noise and we tend to regress things worse once there's noise (old issue) that we can't distinguish from signal (newly introduced issue).

Created #82231 to track this

I'm looking at the reasoning there: "In NativeAOT, EventPipe library is not included by default in applications due to size considerations."

Here's how the numbers look like:

Default: 1,864,192
EventPipe: 1,928,192
EventSource: 3,277,824
EventSource+EventPipe: 3,342,848

I don't know how much bigger EventPipe is going to be, but even if it doubles in size (causing an almost 4% size increase for the EventSource enabled scenario), it might be the right tradeoff: simplifying the configuration matrix for users.

Cc @dotnet/ilc-contrib for thoughts

@agocke
Copy link
Member

agocke commented Feb 16, 2023

I'm looking at the reasoning there: "In NativeAOT, EventPipe library is not included by default in applications due to size considerations."

Could we leave this decision up to the managed linker? Is there a way to structure it such that you either use EventSource and EventPipe gets brought in automatically, or you don't and it's trimmed away?

@agocke
Copy link
Member

agocke commented Feb 17, 2023

I'd like to do something with those failing tests because it's noise and we tend to regress things worse once there's noise (old issue) that we can't distinguish from signal (newly introduced issue).

Yeah, we can't leave these tests failing for more than a day or two. @LakshanF if you can't get them to green soon we should revert the PR

@MichalStrehovsky
Copy link
Member

Would defaulting EventPipe to enabled if EventSource is enabled on Windows fix both the tests and crossgen2? Based on the stack in #82022 (comment) it very well may.

We could then use #82231 for discussion whether that's the default we want to ship.

Managed trimming unfortunately can't get rid of EventSource even in a hello world because we statically use it in places - it's the reason why we need a feature switch for it.

@LakshanF
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@LakshanF
Copy link
Contributor Author

Seems like the EventSource related tests are no longer failing in NativeAOT

@MichalStrehovsky MichalStrehovsky changed the title Add EventPipe library support to CrossGen2 Enable EventPipe when EventSource is enabled Feb 20, 2023
@MichalStrehovsky MichalStrehovsky merged commit 2ea12b5 into dotnet:main Feb 20, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants