[cDAC] GetCodeHeaderData fork#120275
Conversation
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Pull Request Overview
This PR implements the GetCodeHeaderData method and adds GC info decoder functionality to the contract DAC (cDAC) system. It introduces a new GCInfo contract with platform-specific implementations for decoding garbage collection metadata from native code.
Key Changes:
- Implements
GetCodeHeaderDatamethod with proper type safety and error handling - Adds a comprehensive GCInfo contract with decoder capabilities for AMD64, ARM64, and ARM architectures
- Extends ExecutionManager with new methods for method region info, JIT type detection, and method descriptor lookup
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| SOSDacImpl.cs | Implements GetCodeHeaderData with GCInfo decoder integration and debug assertions |
| ISOSDacInterface.cs | Updates interface signature and adds supporting data structures |
| CachingContractRegistry.cs | Registers the new GCInfo contract factory |
| GCInfo contract files | Complete GCInfo decoder implementation with platform-specific traits |
| ExecutionManager files | Extends with method region info, JIT type detection, and entrypoint resolution |
| Data structure files | Adds UnwindInfo, PortableEntryPoint, and related helper classes |
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/PlatformTraits/IGCInfoTraits.cs:1
- Corrected spelling of 'ENCBACE' to 'ENCBASE'.
// Licensed to the .NET Foundation under one or more agreements.
...ed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/GCInfoDecoder.cs
Outdated
Show resolved
Hide resolved
....Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/PlatformTraits/ARMGCInfoTraits.cs
Outdated
Show resolved
Hide resolved
...iagnostics.DataContractReader.Contracts/Contracts/GCInfo/PlatformTraits/ARM64GCInfoTraits.cs
Outdated
Show resolved
Hide resolved
...iagnostics.DataContractReader.Contracts/Contracts/GCInfo/PlatformTraits/AMD64GCInfoTraits.cs
Outdated
Show resolved
Hide resolved
....Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/FrameHandling/FrameIterator.cs
Show resolved
Hide resolved
...ractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerCore.ReadyToRunJitManager.cs
Outdated
Show resolved
Hide resolved
...iagnostics.DataContractReader.Contracts/Contracts/GCInfo/PlatformTraits/AMD64GCInfoTraits.cs
Show resolved
Hide resolved
...ed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/GCInfoDecoder.cs
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs
Show resolved
Hide resolved
...ed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/GCInfoDecoder.cs
Show resolved
Hide resolved
...ative/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/ContractRegistry.cs
Outdated
Show resolved
Hide resolved
noahfalk
left a comment
There was a problem hiding this comment.
This looks good to me modulo a couple comments inline and fleshing out our testing more. Additional testing shouldn't block the PR IMO.
fork of #119609 with GCInfo decoder
Fixes #124687