Skip to content

Conversation

rcj1
Copy link
Contributor

@rcj1 rcj1 commented Sep 23, 2025

No description provided.

GetMethodsWithProfilerModifiedIL cDAC APIs
Copy link
Contributor

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

@Copilot Copilot AI review requested due to automatic review settings September 23, 2025 01:32
Copy link
Contributor

@Copilot 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 two new cDAC (Contract-based Data Access Component) APIs for retrieving profiler-modified IL information: GetProfilerModifiedILInformation and GetMethodsWithProfilerModifiedIL. These APIs replace previous placeholder implementations with full contract-based implementations.

Key changes:

  • Implementation of GetProfilerModifiedILInformation to detect and return information about methods with modified IL (either through ReJIT or profiler modification)
  • Implementation of GetMethodsWithProfilerModifiedIL to enumerate all methods in a module that have profiler-modified IL
  • Addition of supporting contract methods GetDynamicIL and HasDefaultIL to enable the detection logic

Reviewed Changes

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

Show a summary per file
File Description
SOSDacImpl.cs Implements the two main API methods with full logic for detecting profiler-modified IL
ISOSDacInterface.cs Adds DacpProfilerILData struct definition and updates method signature
Loader_1.cs Refactors GetILHeader method and exposes GetDynamicIL as public interface method
CodeVersions_1.cs Implements HasDefaultIL method to check if IL code version uses default IL
ILoader.cs Adds GetDynamicIL method to the ILoader contract interface
ICodeVersions.cs Adds HasDefaultIL method to the ICodeVersions contract interface
Loader.md Updates documentation to reflect the refactored GetILHeader and new GetDynamicIL method
CodeVersions.md Documents the new HasDefaultIL method

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.

looks good to me minus the small comments

@rcj1 rcj1 merged commit e3e2d9f into dotnet:main Sep 26, 2025
48 of 50 checks passed
@rcj1 rcj1 deleted the ProfilerModifiedIL branch September 26, 2025 22:54
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.

2 participants