Display method variants in R2RDump#124010
Merged
jtschuster merged 7 commits intodotnet:mainfrom Feb 6, 2026
Merged
Conversation
Implements change dotnet#8 from async methods R2R breakdown. Improves diagnostic tooling by showing async method modifiers in r2rdump output.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the ReadyToRun reflection tooling so that method signatures used by R2RDump can be annotated with prefixes that distinguish async-related variants (and other stub kinds), and ensures PGO keys stay consistent with the displayed signatures.
Changes:
- Extend
ReadyToRunMethodandPgoInfoKeyto carry and incorporateSignaturePrefixesinto their computed signature strings. - In
ReadyToRunReader, decodeReadyToRunMethodSigFlagsfor instance entrypoints and PGO instrumentation records, build corresponding signature prefixes (currently forAsyncVariant), and thread them intoReadyToRunMethodandPgoInfoKey. - Add explicit
NotImplementedExceptionthrows when encounteringInstantiatingStuborUnboxingStubmethod signature flags in instance entrypoints or PGO data.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs |
Parses method signature flags for instance entrypoints and PGO methods, derives [Async] prefixes, wires signaturePrefixes through to ReadyToRunMethod and PgoInfoKey, and adds NotImplementedException for instantiating/unboxing stub flags. |
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs |
Adds a SignaturePrefixes property and updates the constructor to accept prefixes and prepend them to the human-readable SignatureString used by R2RDump. |
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/PgoInfoKey.cs |
Extends PGO keys to include signaturePrefixes in their SignatureString, and updates FromReadyToRunMethod to construct keys consistent with ReadyToRunMethod.SignatureString. |
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Feb 4, 2026
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Feb 6, 2026
jkotas
reviewed
Feb 6, 2026
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Outdated
Show resolved
Hide resolved
jkotas
approved these changes
Feb 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/PgoInfoKey.cs:40
- PgoInfoKey is public and the constructor signature change adds a required signaturePrefixes parameter. Since this assembly is packable, consider keeping the old constructor as an overload (or make signaturePrefixes optional) to avoid unnecessarily breaking external source consumers.
public PgoInfoKey(IAssemblyMetadata componentReader, string owningType, EntityHandle methodHandle, string[] instanceArgs, string[] signaturePrefixes)
{
ComponentReader = componentReader;
EntityHandle owningTypeHandle;
DisassemblingGenericContext genericContext = new DisassemblingGenericContext(typeParameters: Array.Empty<string>(), methodParameters: instanceArgs);
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
Show resolved
Hide resolved
lewing
pushed a commit
to lewing/runtime
that referenced
this pull request
Feb 9, 2026
Adds signature prefixes to method signatures in R2RDump to differentiate task-returning, async, and (not yet implemented) async resumption stubs in the method entrypoint table dump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds signature prefixes to method signatures in R2RDump to differentiate task-returning, async, and (not yet implemented) async resumption stubs in the method entrypoint table dump.