-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[cDAC] Multi data-descriptor proposal #118126
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
[cDAC] Multi data-descriptor proposal #118126
Conversation
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 introduces support for multi data-descriptor functionality to the Contract Data Access (cDAC) system. The primary purpose is to enable deferred data definition resolution through sub-descriptors when certain data definitions are not known at compile time but may be provided by external components.
Key changes:
- Adds support for string-type global values alongside existing primitive integer constants and pointers
- Introduces sub-descriptor pointers as a new optional component of data descriptors
- Updates the JSON format to include a "sub-descriptors" field with pointer-based references to external data descriptors
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| datacontracts_design.md | Updates global values to support strings and adds sub-descriptor concept documentation |
| data_descriptor.md | Adds comprehensive specification for sub-descriptor descriptors, JSON format updates, and example usage |
| contract-descriptor.md | Adds sub-descriptors field to example JSON and clarifies contract symbol discovery language |
Comments suppressed due to low confidence (1)
docs/design/datacontracts/data_descriptor.md:300
- The link reference uses 'contract-descriptor.md' which is inconsistent with the actual filename 'contract-descriptor.md' shown in the diff. However, this appears to be a correction from 'contract_descriptor.md' to match the actual hyphenated filename, so this is likely fixing an existing inconsistency.
descriptor](./contract-descriptor.md#Contract_descriptor).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
/ba-g docs only change |
|
/ba-g failures unrelated to docs only change |
Why
As we move to completely implement the API's used by SOS in the cDAC, we need to access data structures and global values defined in the GC. These are special because the GC can either be internal to
coreclr.dllor an externalclrgc.dll. Given this option, it is impossible to completely define GC data structures atcoreclr.dllcompile time and store them in the data-descriptor like we do for VM structures.Proposed Solution
Add support for a data-descriptor to have
sub-descriptors. Data-descriptors will have a new optionalsub-descriptorsection which can contain pointers to sub-descriptors. Each sub-descriptor has the same spec as the main (existing) descriptor. The pointers act the same as the well-known symbol name for the main descriptor.Memory Layout
The
sub-descriptorswill be an additional (optional) section of the data-descriptor identical in spec to the existingglobalswith the exception that the value's type must be apointer.Parsing
When parsing a data-descriptor, each sub-descriptor pointer is checked if it is
non-null. If it isnon-null, then the sub-descriptor should be parsed in the same way as the main descriptor.Types, globals, and contract versions are merged between the sub-descriptor and the parent descriptor.
Implemented in: #118050