-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Adding GetReJITInformation cDAC API #119111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rcj1
commented
Aug 26, 2025
- Adding SHash implementation (needed to get dynamic IL)
- Adding GetReJITInformation cDAC API
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
...ged/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
...ged/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
...ged/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/SHash.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
Restructuring SHash
…er.Contracts/Contracts/RuntimeTypeSystem_1.cs Co-authored-by: Max Charlamb <44248479+max-charlamb@users.noreply.github.com>
There was a problem hiding this 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.
...ve/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ILCodeVersionNode.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
...ative/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ISHash.cs
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
...ve/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ILCodeVersionNode.cs
Show resolved
Hide resolved
|
Should the existing C/C++ DAC skip |
I can make that change |
|
LGTM otherwise |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
...ged/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ISOSDacInterface.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
…into GetReJITInformation2
max-charlamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. thanks