Skip to content

Adding IsDiagnosticsILStub() method on MethodDesc and using it to skip over async thunks in a variety of diagnostics-related code in which we would like to hide these from stackwalks, profiler notifications, etc.#120982

Merged
rcj1 merged 3 commits into
dotnet:mainfrom
rcj1:isilstub
Oct 24, 2025

Conversation

@rcj1

@rcj1 rcj1 commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new IsDiagnosticsILStub() method on MethodDesc that combines checks for both IL stubs and async thunk methods, then replaces existing IsILStub() calls throughout the codebase to hide these methods from diagnostics scenarios like stack walks, profiler notifications, and debugger callbacks.

Key Changes

  • Added IsDiagnosticsILStub() method that returns true for both IL stubs and async thunk methods
  • Updated stack walking, exception handling, profiling, and debugging code to use the new method
  • Updated logging messages to reflect the new terminology

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/vm/method.hpp Declared the new IsDiagnosticsILStub() method
src/coreclr/vm/method.inl Implemented IsDiagnosticsILStub() to check both IsILStub() and IsAsyncThunkMethod()
src/coreclr/vm/stackwalk.cpp Updated stack walk filtering to use new method and updated log messages
src/coreclr/vm/jitinterface.cpp Updated inline candidate check to exclude diagnostics IL stubs
src/coreclr/vm/i386/excepx86.cpp Updated exception handling callbacks to skip diagnostics IL stubs
src/coreclr/vm/exinfo.cpp Updated exception info callbacks to skip diagnostics IL stubs
src/coreclr/vm/excep.cpp Updated stack trace building to skip diagnostics IL stubs
src/coreclr/debug/ee/debugger.cpp Updated debugger assertion to verify no diagnostics IL stubs
src/coreclr/debug/daccess/dacdbiimpl.cpp Updated DAC method classification to identify diagnostics IL stubs

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@rcj1

rcj1 commented Oct 22, 2025

Copy link
Copy Markdown
Contributor Author

Out of scope:

  • Changes to DAC etc naming for async thunks
  • Changes in Debugger::Step()

Comment thread src/coreclr/vm/method.inl Outdated
Comment thread src/coreclr/vm/method.hpp Outdated
@rcj1

rcj1 commented Oct 24, 2025

Copy link
Copy Markdown
Contributor Author

/ba-g timeouts

@rcj1 rcj1 merged commit 70fd4cf into dotnet:main Oct 24, 2025
87 of 98 checks passed
@rcj1 rcj1 deleted the isilstub branch October 24, 2025 00:13
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 23, 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