Skip to content

[cDAC] GetCodeHeaderData fork#120275

Merged
max-charlamb merged 27 commits intodotnet:mainfrom
max-charlamb:cdac-codeheaderdata
Feb 25, 2026
Merged

[cDAC] GetCodeHeaderData fork#120275
max-charlamb merged 27 commits intodotnet:mainfrom
max-charlamb:cdac-codeheaderdata

Conversation

@max-charlamb
Copy link
Member

@max-charlamb max-charlamb commented Sep 30, 2025

fork of #119609 with GCInfo decoder

  • Adding GetCodeHeaderData cDAC API
  • Implementing unwind data size on platforms other than x86 in helper class
  • required additions to hot/cold lookup helpers
  • Implements IGCInfo contract to decode GCInfo
    • Currently supports x64, arm64, and arm. I plan to move the existing x86 GCInfo decoding to this new contract, but want to make that a separate PR.

Fixes #124687

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@max-charlamb max-charlamb marked this pull request as ready for review October 2, 2025 21:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GetCodeHeaderData method 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.

@max-charlamb max-charlamb requested a review from Copilot October 2, 2025 21:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings February 17, 2026 22:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me modulo a couple comments inline and fleshing out our testing more. Additional testing shouldn't block the PR IMO.

Copilot AI review requested due to automatic review settings February 24, 2026 19:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.

@max-charlamb max-charlamb merged commit b5f00c7 into dotnet:main Feb 25, 2026
110 of 114 checks passed
@max-charlamb max-charlamb deleted the cdac-codeheaderdata branch February 25, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cDAC] Implement ISOSDacInterface::GetCodeHeaderData

7 participants