[cDAC] Expose interpreter JIT manager code heaps - #134072
Merged
max-charlamb merged 1 commit intoSep 23, 2026
Merged
max-charlamb merged 1 commit into
max-charlamb merged 1 commit into
Conversation
Expose the optional interpreter JIT manager through the ExecutionManager data contract and allow callers to enumerate code heaps by manager kind. Document reader version 2 and cover the behavior with unit and dump tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b507532c-3857-4e61-86a9-69fe22ec157b
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 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
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 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.
🟡 Changes recommended
A critical API compatibility issue and a moderate reader-version test gap remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request exposes interpreter JIT manager code heaps through cDAC and updates related contracts, descriptors, tests, and documentation.
Changes:
- Adds optional interpreter manager discovery and heap enumeration APIs.
- Updates native descriptors and test coverage.
- Bumps the advisory reader version to 2 and documents the change.
File summaries
| File | Summary |
|---|---|
src/native/managed/cdac/tests/UnitTests/MockDescriptors/MockDescriptors.ExecutionManager.cs |
Adds interpreter manager test descriptors. |
src/native/managed/cdac/tests/UnitTests/ExecutionManager/ExecutionManagerTests.cs |
Tests manager selection and heap enumeration. |
src/native/managed/cdac/tests/DumpTests/InterpreterStackDumpTests.cs |
Adds interpreter heap dump coverage. |
src/native/managed/cdac/tests/DumpTests/CodeHeapListDumpTests.cs |
Updates EE heap queries. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs |
Preserves EE-only legacy behavior. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeInfo_1.cs |
Reports reader version 2. Moderate finding (1 vote): add a unit assertion for GetCurrentReaderVersion(). |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerCore.cs |
Implements manager discovery and enumeration. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/ExecutionManager_1.cs |
Exposes the new manager APIs. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs |
Adds the interpreter global name. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IExecutionManager.cs |
Adds manager-kind APIs. Critical finding (2 votes): retain existing EE-only members as EE-forwarding wrappers. |
src/coreclr/vm/datadescriptor/datadescriptor.inc |
Publishes the optional native global. |
src/coreclr/vm/codeman.h |
Exposes the interpreter manager address. |
docs/design/datacontracts/RuntimeInfo.md |
Links reader-version history. |
docs/design/datacontracts/reader-version-history.md |
Documents reader versions 1 and 2. |
docs/design/datacontracts/ExecutionManager.md |
Documents the updated contract. |
docs/design/datacontracts/data-descriptor-meanings.json |
Updates descriptor meanings. |
Review details
Suppressed comments (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeInfo_1.cs:44
- Please add a unit assertion for
GetCurrentReaderVersion()returning 2. This value was just changed and controls the reader capability advertised to callers, butRuntimeInfoTestsdoes not exercise it, so a future mismatch could silently break the reader-version advisory behavior.
uint IRuntimeInfo.GetCurrentReaderVersion() => 2;
- Files reviewed: 16/16 changed files
- Comments generated: 1
- Review effort level: Lite
max-charlamb
added a commit
that referenced
this pull request
Sep 18, 2026
Expose `ExecutionManager::m_pInterpreterJitManager` as the optional `InterpreterJitManagerAddress` cDAC data-descriptor global when CoreCLR is built with `FEATURE_INTERPRETER`. Will be used by #134072 for cDAC dump enumeration. Co-authored-by: Max Charlamb <maxcharlamb@microsoft.com> Copilot-Session: b507532c-3857-4e61-86a9-69fe22ec157b
This was referenced Sep 18, 2026
davidwrighton
approved these changes
Sep 23, 2026
max-charlamb
deleted the
dev/max-charlamb/cdac-interpreter-code-heaps
branch
September 23, 2026 21:13
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.
Summary
InterpreterJitManagerAddressthrough the CoreCLR data descriptorJitManagerKind-based ExecutionManager APIs for discovering EE and interpreter managers and enumerating their code heaps independentlyInterpreterStackdebuggeeMotivation
Interpreter-generated code is owned by
InterpreterJitManager, whose code heaps were not discoverable through the managed cDAC ExecutionManager contract. Dump collectors using the contract could therefore omit metadata stored alongside interpreted code.The new descriptor global is optional. Readers tolerate runtimes where it is absent, and older readers ignore it. Existing
ISOSDacInterfacebehavior remains EE-only.Validation
build.cmd clr+libs+tools.cdac+tools.cdactests -rc Release -lc Release /p:UseSharedCompilation=falseInterpreterStackDumpTests.ExecutionManager_EnumeratesInterpreterCodeHeaps: 1 passed (local/jit), 1 expected skip (local/r2r, debuggee is JIT-only)Note
This pull request description was generated with GitHub Copilot.