NativeAot: Enable GC event tracing on standalone GC
Before this change, no GC events would be recorded when using dotnet trace on a NativeAOT program that uses standalone GC.
I copied the implementation from CoreCLR. The one change I made was to use a Crst instead of a spin lock.
Contributes to #90676
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.
Issue Details
Before this change, no GC events would be recorded when using dotnet trace on a NativeAOT program that uses standalone GC.
I copied the implementation from CoreCLR. The one change I made was to use a Crst instead of a spin lock.
Contributes to #90676
| Author: | AustinWise |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
I experimented with the changes on Windows, here are the experiments:
Experiment 1: Capturing traces using dotnet-trace without clrgc. Experiment 2: Capturing traces using dotnet-trace with clrgc. Experiment 3: Capturing traces using ETW with clrgc.
All of these worked, in the sense that PerfView can show GCStats correctly on the captured trace.