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

Use the same tracked contexts for event pipe and ETW in nativeaot #89902

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Aug 3, 2023

  • Make tracking for event pipe and ETW enabled/status use the same contexts
    • Move event pipe context / callback out of dotnetruntime.cpp and into eventtrace.cpp
      • 42801a9 is just copying the functions
    • Pull out the shared pieces of the callbacks into the common function (similar to coreclr - with the thought that we can eventually unfork the two)
      • 5aafe42 updates the copied functions
    • Remove RH_ETW_CONTEXT and switch to MCGEN_TRACE_CONTEXT, which is what would be generated when nativeaot eventually gets onto the generation scripts
  • Switch to using the .NET ETW provider GUIDs instead of .NET Native
    • Rename the handles / contexts to be DotNETRuntime instead of GC - most of the changes in EtwEvents.h were just this
  • Implement ep_rt_providers_validate_all_disabled (uses the contexts)

@ghost
Copy link

ghost commented Aug 3, 2023

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

Issue Details
  • Make tracking for event pipe and ETW enabled/status use the same contexts
    • Move event pipe context / callback out of dotnetruntime.cpp and into eventtrace.cpp
    • Pull out the shared pieces of the callbacks into the common function (similar to coreclr - with the thought that we can eventually unfork the two)
    • Remove RH_ETW_CONTEXT and switch to MCGEN_TRACE_CONTEXT, which is what would be generated when nativeaot eventually gets onto the generation scripts
  • Switch to using the .NET ETW provider GUIDs instead of .NET Native
    • Rename the handles / contexts to be DotNETRuntime instead of GC - most of the changes in EtwEvents.h were just this
  • Implement ep_rt_providers_validate_all_disabled (uses the contexts)
Author: elinor-fung
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

Copy link
Contributor

@LakshanF LakshanF left a comment

Choose a reason for hiding this comment

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

TLGTM. Thanks for these series of changes making ETW opt-in, the design coherent through the convoluted history and making it easier for us to switch to the python source gen to get ready for enabling future events easier!

@elinor-fung elinor-fung merged commit fa78033 into dotnet:main Aug 4, 2023
@elinor-fung elinor-fung deleted the etwEventPipeContext branch August 4, 2023 18:49
@ghost ghost locked as resolved and limited conversation to collaborators Sep 3, 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.

2 participants