-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
I couldn't figure out the best area label to add to this PR. Please help me learn by adding exactly one area label. |
marek-safar
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Outdated
Show resolved
Hide resolved
marek-safar
approved these changes
Jun 19, 2020
stephentoub
reviewed
Jun 19, 2020
...ystem.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TplEventSource.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Show resolved
Hide resolved
joperezr
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
Show resolved
Hide resolved
joperezr
reviewed
Jun 19, 2020
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Show resolved
Hide resolved
joperezr
approved these changes
Jun 19, 2020
vitek-karas
approved these changes
Jun 24, 2020
src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
Show resolved
Hide resolved
noahfalk
approved these changes
Jun 26, 2020
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 : )
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
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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
cc @marek-safar