- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
Add MethodDesc comments #121094
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
Add MethodDesc comments #121094
Conversation
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 clarifying documentation comments to MethodDesc APIs in the CoreCLR VM to explain their behavior with respect to TransientIL and diagnostics. The changes help distinguish between different categories of runtime-generated methods (DynamicMethodDesc, TransientIL, ILStubs) and clarify when methods should be hidden from diagnostic tools.
Key Changes
- Added reminder comment in TryGenerateTransientILImplementationto keep diagnostics filtering in sync when adding new transient IL methods
- Documented that IsDynamicMethod()only returns true for DynamicMethodDesc, not all runtime-generated IL
- Clarified that IsILStub()only detects a subset of IL stubs (those using DynamicMethodDesc)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description | 
|---|---|
| src/coreclr/vm/prestub.cpp | Adds comment reminding developers to update IsDiagnosticsHidden()when adding new transient IL methods | 
| src/coreclr/vm/method.inl | Documents the scope and limitations of IsDynamicMethod(),IsILStub(), andIsDiagnosticsHidden()methods | 
Added clarifying comments on some MethodDesc APIs related to TransientIL and diagnostics.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
| /ba-g this was already good prior to rebasing and its not worthwhile to re-run all the CI again. | 
Added clarifying comments on some MethodDesc APIs related to TransientIL and diagnostics.
Fyi @rcj1 @davidwrighton @hoyosjs @jkotas
This is a follow up to #120982