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
Conversation
Contributor
There was a problem hiding this comment.
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 |
Contributor
|
Tagging subscribers to this area: @mangod9 |
Contributor
Author
|
Out of scope:
|
jkotas
reviewed
Oct 22, 2025
jkotas
reviewed
Oct 23, 2025
jkotas
approved these changes
Oct 23, 2025
hoyosjs
approved these changes
Oct 23, 2025
Open
3 tasks
Contributor
Author
|
/ba-g timeouts |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.