Skip to content

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

Merged
elinor-fung merged 4 commits into
dotnet:mainfrom
elinor-fung:etwEventPipeContext
Aug 4, 2023
Merged

Use the same tracked contexts for event pipe and ETW in nativeaot#89902
elinor-fung merged 4 commits into
dotnet:mainfrom
elinor-fung:etwEventPipeContext

Conversation

@elinor-fung

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

Copy link
Copy Markdown
Member
  • 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 ghost assigned elinor-fung Aug 3, 2023
@ghost

ghost commented Aug 3, 2023

Copy link
Copy Markdown

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: -

@LakshanF LakshanF left a comment

Copy link
Copy Markdown
Contributor

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