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

[release/9.0] Fix trimming for DiagnosticSource #106842

Merged
merged 3 commits into from
Aug 23, 2024

Commits on Aug 22, 2024

  1. Fix trimming for DiagnosticSource

    Recent changes to EventSource startup caused the IL trimmer to include portions of the DiagnosticSource assembly. Adding the IsMeterSupported feature check wasn't sufficient because EventSource also roots all of its methods via a DynamicallyAccessedMembers attribute. To ensure that the new methods can be removed when needed I refactored them into a separate EventSourceInitHelper class that won't be rooted by the existing DAM attribute.
    
    When EventSouce.IsSupported is false I'd expect the entire EventSourceInitHelper class to be unreachable. If only EventSource.IsMeterSupported is false then I'd expect PreregisterEventProviders and GetMetricsEventSource() to be unreachable but the rest of the class will remain.
    
    Hopefully this really fixes #106265 this time.
    noahfalk authored and github-actions committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    103ff2d View commit details
    Browse the repository at this point in the history
  2. PR feedback

    noahfalk authored and github-actions committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    3f99b64 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Configuration menu
    Copy the full SHA
    46699d9 View commit details
    Browse the repository at this point in the history