Skip to content

Make dotnet-gcdump work with native AOT #5506

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged

Conversation

MichalStrehovsky
Copy link
Member

Pretty much just adjusts what we had for Project N:

  • IsProjectN is not true for native AOT because we use the same provider GUID as JIT-based CoreCLR and not Project N (which is by design)
  • It is still possible to handle both Project N and native AOT the same way where it matters because both Project N and native AOT emit the same flags (TypeFlags.ModuleBaseAddress and ModuleFlags.Native)
  • Looks like Project N GCDump always relied on Windows kernel module load data only. I'm adding a path that can also use our own module load events (Project N also generates those)

Cc @dotnet/ilc-contrib

Pretty much just adjusts what we had for Project N:

* `IsProjectN` is not true for native AOT because we use the same provider GUID as JIT-based CoreCLR and not Project N (which is by design)
* It is still possible to handle both Project N and native AOT the same way where it matters because both Project N and native AOT emit the same flags (`TypeFlags.ModuleBaseAddress` and `ModuleFlags.Native`)
* Looks like Project N GCDump always relied on Windows kernel module load data only. I'm adding a path that can also use our own module load events (Project N also generates those)
@MichalStrehovsky MichalStrehovsky requested a review from a team as a code owner June 17, 2025 10:50
@MichalStrehovsky
Copy link
Member Author

GCDumps taken with this can be opened with PerfView and PerfView will prompt for the PDBs. If available, (mangled) type names will show up in PerfView UI.

MichalStrehovsky added a commit to MichalStrehovsky/perfview that referenced this pull request Jun 17, 2025
With this, PerfView will be able to create native AOT gcdumps. It activates the same codepaths we had for Project N, so it will also properly decode type names.

The changes to DotNetHeapDumpGraphReader match dotnet/diagnostics#5506.
Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@noahfalk noahfalk merged commit 7b93285 into main Jun 18, 2025
19 checks passed
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-1 branch June 19, 2025 22:25
brianrob pushed a commit to microsoft/perfview that referenced this pull request Jun 20, 2025
With this, PerfView will be able to create native AOT gcdumps. It activates the same codepaths we had for Project N, so it will also properly decode type names.

The changes to DotNetHeapDumpGraphReader match dotnet/diagnostics#5506.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants