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

Fix missing GC events on non-Windows for nativeaot #88282

Merged
merged 6 commits into from
Jul 10, 2023

Conversation

elinor-fung
Copy link
Member

  • Add a function for checking whether a keyword/level is enabled for the DotNETRuntime provider
  • Include eventtrace.cpp based on FEATURE_EVENT_TRACE instead of only for Windows
  • Separate eventtrace.cpp into different files based on functionality
    • All the code in eventtrace_bulktype.cpp and eventtrace_gcheap.cpp was directly from either eventtrace.cpp or rheventtrace.cpp
    • The bulktype and gcheap files remain Windows-only as we aren't prioritizing them yet
      • bulktype directly uses ETW functions
      • gcheap handles GCHeapDump and GCHeapSurvivalAndMovement - also, WalkMovedReferences isn't hooked up, so I don't think GCHeapSurvivalAndMovement works

This does not change the ETW emitting, so that is still:

  • Part of the core runtime
  • Using 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).

Fixes #87445

@ghost
Copy link

ghost commented Jul 1, 2023

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

Issue Details
  • Add a function for checking whether a keyword/level is enabled for the DotNETRuntime provider
  • Include eventtrace.cpp based on FEATURE_EVENT_TRACE instead of only for Windows
  • Separate eventtrace.cpp into different files based on functionality
    • All the code in eventtrace_bulktype.cpp and eventtrace_gcheap.cpp was directly from either eventtrace.cpp or rheventtrace.cpp
    • The bulktype and gcheap files remain Windows-only as we aren't prioritizing them yet
      • bulktype directly uses ETW functions
      • gcheap handles GCHeapDump and GCHeapSurvivalAndMovement - also, WalkMovedReferences isn't hooked up, so I don't think GCHeapSurvivalAndMovement works

This does not change the ETW emitting, so that is still:

  • Part of the core runtime
  • Using 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).

Fixes #87445

Author: elinor-fung
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@jkotas
Copy link
Member

jkotas commented Jul 1, 2023

Separate eventtrace.cpp into different files based on functionality

nativeaot\Runtime\eventtrace.cpp and vm\eventtrace.cpp are same files. If you are splitting the nativeaot one into multiple files, you may consider doing the same for coreclr one too so that it is easier to compare and eventually unify.

@elinor-fung elinor-fung force-pushed the nativeaot-runtimeevents-unix branch from 3b04711 to b1fe7e4 Compare July 3, 2023 16:03
@elinor-fung elinor-fung marked this pull request as ready for review July 3, 2023 19:16
@elinor-fung elinor-fung requested a review from LakshanF July 3, 2023 19:16
@elinor-fung elinor-fung force-pushed the nativeaot-runtimeevents-unix branch from b1fe7e4 to 764ccab Compare July 6, 2023 16:28
@elinor-fung elinor-fung merged commit acafb20 into dotnet:main Jul 10, 2023
@elinor-fung elinor-fung deleted the nativeaot-runtimeevents-unix branch July 10, 2023 03:55
@ghost ghost locked as resolved and limited conversation to collaborators Aug 9, 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.

[NativeAOT] GC events don't get logged on Linux
3 participants