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

Introduce EventSource.IsSupported feature switch #38129

Merged
merged 5 commits into from
Jun 27, 2020

Conversation

eerhardt
Copy link
Member

This allows for all of the EventSource logic to be trimmed by the ILLinker when the feature switch is set to false.

Fix #37414

On the default Blazor template, this change along with #38125 allows for ~160 KB of savings.

Build Size
master 3,804,748 bytes
PR + #38125 3,641,932 bytes

cc @marek-safar

This allows for all of the EventSource logic to be trimmed by the ILLinker when the feature switch is set to false.

Fix dotnet#37414
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. Please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Jun 19, 2020

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
Notify danmosemsft if you want to be subscribed.

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM : )

@eerhardt
Copy link
Member Author

The test is now unblocked with a new version of RemoteExecutor. If anyone wants to take another look here, I plan on merging this once CI is green.

@eerhardt eerhardt merged commit a547d41 into dotnet:master Jun 27, 2020
@eerhardt eerhardt deleted the EventSourceFeatureSwitch branch June 27, 2020 17:36
eerhardt added a commit to eerhardt/runtime that referenced this pull request Jul 9, 2020
Follow up to dotnet#38129. NetEventSource code was still left in even when EventSource.IsSupported is false, since all the usages of NetEventSource are keying off its own static property: NetEventSource.IsEnabled.

Remove NetEventSource.IsEnabled so the linker can trim NetEventSource code when EventSource.IsSupported is false.
stephentoub pushed a commit that referenced this pull request Jul 9, 2020
* Trim NetEventSource when EventSource.IsSupported is false

Follow up to #38129. NetEventSource code was still left in even when EventSource.IsSupported is false, since all the usages of NetEventSource are keying off its own static property: NetEventSource.IsEnabled.

Remove NetEventSource.IsEnabled so the linker can trim NetEventSource code when EventSource.IsSupported is false.

* Remove HttpTelemetry.IsEnabled static property so the linker can trim EventSource code when EventSource.IsSupported is false.

* Fix fake NetEventSource to match what is in the product.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

Add feature flag which controls Event Tracing support
9 participants