Skip to content

Make firing of ETW events in nativeaot opt-in via the enabled/disabled lib - #88800

Merged
elinor-fung merged 4 commits into
dotnet:mainfrom
elinor-fung:nativeaot-optin-etw
Jul 14, 2023
Merged

Make firing of ETW events in nativeaot opt-in via the enabled/disabled lib#88800
elinor-fung merged 4 commits into
dotnet:mainfrom
elinor-fung:nativeaot-optin-etw

Conversation

@elinor-fung

@elinor-fungelinor-fung commented Jul 12, 2023

Copy link
Copy Markdown
Member
  • Switch the pivot for the enabled/disabled functions to FireEtw* instead of EventPipeWriteEvent*
    • Functions fire both EventPipe and ETW despite the naming (matches coreclr/mono names)
  • Moves support for ETW firing (and helpers only used to determine information for tracing) out of the core runtime and into the enabled lib - same opt-in as EventPipe support

The actual implementation still:

  • Has separate tracking from that for the EventPipe support
  • Uses the .NET Native provider GUIDs (47c3ba0c-77f1-4eb0-8d4d-aef447f16a85, private: 1095638c-8748-4c7a-b39e-baea27b9c589) instead of the normal .NET ones (e13c0d23-ccbc-4e12-931b-d9cc2eee27e4, private: 763FD754-7086-4dfe-95EB-C01A46FAF4CA).

This will enable us to actually reconcile the ETW and EventPipe tracking/contexts/callbacks in nativeaot, which we will need to address #88162 and to switch to the generation scripts based on the event manifest instead of checking in modified parts of the output and manually updating.

I'd also like to move some of the files that are no longer part of the core runtime into a subdirectory (of nativeaot/Runtime) - but in a separate change.

@ghost

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
  • Switch the pivot for the enabled/disabled functions to FireEtw* instead of EventPipeWriteEvent*
    • Functions fire both EventPipe and ETW despite the naming (matches coreclr/mono names)
  • Moves support for ETW firing (and helpers only used to determine information for tracing) out of the core runtime and into the enabled lib - same opt-in as EventPipe support

The actual implementation still:

  • Has separate tracking from that for the EventPipe support
  • Uses the .NET Native provider GUIDs (47c3ba0c-77f1-4eb0-8d4d-aef447f16a85, private: 1095638c-8748-4c7a-b39e-baea27b9c589) instead of the normal .NET ones (e13c0d23-ccbc-4e12-931b-d9cc2eee27e4, private: 763FD754-7086-4dfe-95EB-C01A46FAF4CA).

This will enable us to actually reconcile the ETW and EventPipe tracking/contexts/callbacks in nativeaot, which we will need to address #88162 and to switch to the generation scripts based on the event manifest instead of checking in modified parts of the output and manually updating.

Author:elinor-fung
Assignees:-
Labels:

area-NativeAOT-coreclr

Milestone:-

Comment threadsrc/coreclr/nativeaot/Runtime/EtwEvents.h Outdated

@LakshanFLakshanF 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.

Thanks for making this change! The clean separation is going to make it much easier, both to add new events and for the change to auto-generated python scripts.

@elinor-fung

Copy link
Copy Markdown
MemberAuthor

Failure is #88870.

@elinor-fung
elinor-fung merged commit 4a45bd8 into dotnet:mainJul 14, 2023
@elinor-fung
elinor-fung deleted the nativeaot-optin-etw branch July 14, 2023 20:58
@ghostghost locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for freeto 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

@elinor-fung@LakshanF