Skip to content

Conversation

@rcj1
Copy link
Contributor

@rcj1 rcj1 commented Aug 26, 2025

  • Adding SHash implementation (needed to get dynamic IL)
  • Adding GetReJITInformation cDAC API

@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.

@rcj1 rcj1 marked this pull request as draft August 29, 2025 16:43
rcj1 and others added 6 commits September 2, 2025 16:22
@rcj1 rcj1 marked this pull request as ready for review September 4, 2025 22: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

This PR adds the GetReJITInformation cDAC API by implementing support for SHash data structures and extending the code versioning infrastructure. The changes enable accessing dynamic IL information needed for ReJIT operations.

Key changes:

  • Implements SHash contract and supporting infrastructure for hash table operations
  • Adds GetReJITInformation API with proper cDAC implementation
  • Extends data contracts to support dynamic IL blob tables and async method data

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 the complete GetReJITInformation API replacing the stub implementation
ISOSDacInterface.cs Defines DacpReJitData2 structure and updates method signature
SHash_1.cs Implements SHash contract for hash table operations
CodeVersions_1.cs Adds GetIL method to retrieve IL addresses from code versions
RuntimeTypeSystem_1.cs Adds MayHaveILHeader method and async method detection
Loader_1.cs Implements GetILHeader method with dynamic IL blob support
Various data contracts Adds new data structures for DynamicILBlobEntry, AsyncMethodData, and Module extensions
Documentation Adds comprehensive documentation for SHash, CodeVersions, and RuntimeTypeSystem contracts
Comments suppressed due to low confidence (1)

src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/SHash_1.cs:1

  • The IsDeleted check is being called with the wrong parameter type. It should check if the current entry is deleted, not the key. Change to if (!shashTable.Traits.IsDeleted(current) && shashTable.Traits.Equals(key, shashTable.Traits.GetKey(current)))
// Licensed to the .NET Foundation under one or more agreements.

rcj1 and others added 2 commits September 4, 2025 16:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jkotas
Copy link
Member

jkotas commented Sep 12, 2025

Should the existing C/C++ DAC skip MayHaveILHeader and MethodDesc roundtrip too so that it produces the same results as cDAC?

@rcj1
Copy link
Contributor Author

rcj1 commented Sep 12, 2025

Should the existing C/C++ DAC skip MayHaveILHeader and MethodDesc roundtrip too so that it produces the same results as cDAC?

I can make that change

@jkotas
Copy link
Member

jkotas commented Sep 13, 2025

LGTM otherwise

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Copy link
Member

@max-charlamb max-charlamb left a comment

Choose a reason for hiding this comment

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

lgtm. thanks

@rcj1 rcj1 merged commit 8e80e90 into dotnet:main Sep 16, 2025
100 of 102 checks passed
@rcj1 rcj1 deleted the GetReJITInformation2 branch September 16, 2025 01:29
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants