-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[cDAC] save datadescriptors in minidumps #121360
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
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds enumeration support for cDAC (Contract-based DAC) data descriptors in minidumps. The main purpose is to ensure that cDAC contract descriptor data structures are included in minidump memory reports, making them available for debugging.
Key changes:
- Adds a new
EnumMemDataDescriptorsmethod that enumerates the main ContractDescriptor and its subdescriptors - Integrates the new enumeration into the minidump generation workflow
- Documents the ordering requirement for subdescriptor pointers in the global structure
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/vm/datadescriptor/datadescriptor.inc | Adds a comment documenting that subdescriptor pointers must be the last pointers in the global structure |
| src/coreclr/debug/daccess/enummem.cpp | Implements EnumMemDataDescriptors to enumerate ContractDescriptor structures and integrates it into the minidump workflow |
| src/coreclr/debug/daccess/dacimpl.h | Declares the new EnumMemDataDescriptors method |
| src/coreclr/debug/daccess/CMakeLists.txt | Adds include directory for contract-descriptor.h header |
Saves datadescriptors json blobs in minidumps.
This enumeration algorithm is basic and hardcodes the number of sub-descriptors on the main datadescriptor. Fully recursing the subdescriptors the same way as the cDAC would require parsing the JSON blob. I believe this is fine for now and in the future, we'd move this code over to the cDAC where it is already parsed.
My biggest concern is bloating minidump file size when this won't be used in most scenarios for now.