[cDAC] Multi data-descriptor proposal#118126
Merged
max-charlamb merged 4 commits intodotnet:mainfrom Oct 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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>
jkotas
reviewed
Jul 28, 2025
jkotas
reviewed
Jul 28, 2025
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
noahfalk
approved these changes
Sep 16, 2025
Member
Author
|
/ba-g docs only change |
Member
Author
|
/ba-g failures unrelated to docs only change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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