[cDAC] Implement AreOptimizationsDisabled for cDAC#128672
Merged
barosiak merged 5 commits intoMay 29, 2026
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
Implements AreOptimizationsDisabled in the cDAC DacDbiImpl so it no longer needs to fall back to the legacy implementation, and adds the supporting IReJIT.IsDeoptimized contract API plus an ILCodeVersionNode.Deoptimized data field.
Changes:
- Add
IsDeoptimizedtoIReJITand implement it inReJIT_1mirroringILCodeVersion::IsDeoptimized(synthetic → false; explicit → node field). - Expose
ILCodeVersionNode::m_deoptimizedvia a new data descriptor entry and managedILCodeVersionNode.Deoptimizedproperty. - Implement
DacDbiImpl.AreOptimizationsDisabledusing cDAC contracts (with#if DEBUGvalidation against the legacy implementation) and add unit tests for both the contract and DacDbi paths.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/codeversion.h | Adds cdac_data<ILCodeVersionNode>::Deoptimized offset entry. |
| src/coreclr/vm/datadescriptor/datadescriptor.inc | Adds Deoptimized field to the ILCodeVersionNode data descriptor (typed T_BOOL). |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IReJIT.cs | Adds default IsDeoptimized method on the IReJIT contract. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ReJIT_1.cs | Implements IsDeoptimized for the c1 contract version. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ILCodeVersionNode.cs | Reads the new Deoptimized field as uint and exposes it as bool. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements AreOptimizationsDisabled via contracts with debug-time legacy cross-check. |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.CodeVersions.cs | Adds Deoptimized field to mock ILCodeVersionNode layout/builder. |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.ReJIT.cs | Plumbs deoptimized parameter through AddExplicitILCodeVersionNode. |
| src/native/managed/cdac/tests/ReJITTests.cs | New tests for synthetic/explicit IsDeoptimized behavior. |
| src/native/managed/cdac/tests/DacDbiImplTests.cs | New tests covering null-output, invalid token, null MethodDesc, and deoptimized/not-deoptimized paths for AreOptimizationsDisabled. |
| docs/design/datacontracts/ReJIT.md | Documents the new IsDeoptimized API and Deoptimized field. |
This was referenced May 28, 2026
Open
noahfalk
approved these changes
May 28, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/ba-g unrelated preexisting infrastructure failures |
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
Implements
AreOptimizationsDisabledin the cDAC.Changes
AreOptimizationsDisabledinDacDbiImplwith#if DEBUGlegacy validationDeoptimizedfield toILCodeVersionNodedata descriptors and managed data classIsDeoptimizedtoIReJITcontract interface and implementationReJIT.mddocumentation