-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
GC events appear to be broken with NativeAOT #82318
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionWhen I switched IL2CPP to be compiled with NativeAOT, our GC event tracking logic stopped working. I pulled the code out into a repro project and as far as I can tell the GC events are no longer firing with NativeAOT. Reproduction Steps
Expected behaviorGot Event Source Actual behaviorHello, World! Regression?No response Known WorkaroundsNo response Configuration7.0.100 Windows 11 x64 It is specific to NativeAOT. I did not test NativeAOT on Linux. Other informationI found this a little interesting, not sure if it really is. Once you add
Add
|
cc @LakshanF |
EventSource and EventPipe tracing is not enabled for NativeAOT in .NET 7. It is being worked on for .NET 8: #79241 |
Closing as dup of #79241 |
Description
When I switched IL2CPP to be compiled with NativeAOT, our GC event tracking logic stopped working. I pulled the code out into a repro project and as far as I can tell the GC events are no longer firing with NativeAOT.
Reproduction Steps
Check out the repro project here https://github.com/mrvoorhe/NativeAOTGCEventsRepro
dotnet publish
GCEventsTest\bin\Debug\net7.0\win-x64\publish\GCEventsTest.exe
Expected behavior
Got Event Source
Got Event Source
Hello, World!
Got Event Source
GC - Gen 0
GC End - Gen - 0
GC - Gen 1
GC End - Gen - 1
GC - Gen 0
GC End - Gen - 0
GC - Gen 0
GC End - Gen - 0
GC - Gen 0
GC End - Gen - 0
GC - Gen 2
GC End - Gen - 2
Done
Got Event Source
Actual behavior
Hello, World!
Done
Regression?
No response
Known Workarounds
No response
Configuration
7.0.100
Windows 11
x64
It is specific to NativeAOT. I did not test NativeAOT on Linux.
Other information
I found this a little interesting, not sure if it really is.
Once you add
<PublishAot>true</PublishAot>
to your csproj, runningdotnet run
will produce the bad outputAdd
<EventSourceSupport>true</EventSourceSupport>
to the project and rundotnet run
again, and you get the expected output.The text was updated successfully, but these errors were encountered: