[WIP] [cDAC] Expose ilc descriptors for cdac - #132304
Closed
rcj1 wants to merge 2 commits into
Closed
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the NativeAOT/ILC managed cDAC descriptor generation so that additional “layout-only” types (not necessarily having an emitted EEType/MethodTable) can be included in the JSON descriptor, and adds a small test to validate that thread-static related descriptor types are produced.
Changes:
- Add a mechanism (
IDataDescriptorTypeProvider+MetadataManagertracking) for dependency graph nodes to register additional managed descriptor types. - Extend
ManagedDataDescriptorNodedescriptor emission to include the registered descriptor types (with[DataContract]enforcement). - Add NativeAOT runtime structs (
TypeManagerSlot,TypeThreadStaticIndex) annotated with[DataContract], and add a unit test validating their emitted layout.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj | Adds friend access for compiler tests; includes new interface source file. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs | Tracks and exposes registered descriptor types via Graph_NewMarkedNode. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ManagedDataDescriptorProvider.cs | Updates doc comment describing how descriptor types are discovered. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeThreadStaticIndexNode.cs | Registers TypeThreadStaticIndex layout type for descriptor emission. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeManagerIndirectionNode.cs | Registers TypeManagerSlot layout type for descriptor emission. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs | Ensures MetadataManager subscribes to graph marking early enough to observe roots. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ManagedDataDescriptorNode.cs | Emits registered descriptor types into the JSON descriptor; exposes helper for tests. |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/IDataDescriptorTypeProvider.cs | New internal interface used by nodes to supply descriptor types. |
| src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.Assets/DependencyGraph.cs | Adds a new asset test case and custom attribute for asserting descriptor types. |
| src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs | Adds validation that registered descriptor types appear in the emitted JSON descriptor. |
| src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj | Ensures DataContractAttribute is available in Test.CoreLib for compilation/tests. |
| src/coreclr/nativeaot/Common/src/Internal/Runtime/CompilerHelpers/StartupCodeHelpers.cs | Introduces [DataContract]-annotated runtime structs matching ILC-emitted layouts. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 2
- Review effort level: Lite
Comment on lines
+10
to
+11
| /// The node discovers [DataContract]-annotated runtime types and layouts registered by | ||
| /// ILC object nodes during object data emission. |
| class ThreadStaticDataDescriptorTest | ||
| { | ||
| [ThreadStatic] | ||
| public static object Value = null; |
This was referenced Aug 14, 2026
Contributor
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Copilot stopped reviewing on behalf of
rcj1 due to an error
August 14, 2026 16:38
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Expose some internals to the descriptor.