RFR: 8373615: Improve HotSpot debug functions findclass() and findmethod [v4]

Matias Saavedra Silva matsaave at openjdk.org
Mon Dec 15 21:03:35 UTC 2025


On Mon, 15 Dec 2025 19:23:08 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> I used the `findclass` and `findmethod` functions in debug.cpp  a lot when debugging problems with class metadata.
>> 
>> https://github.com/openjdk/jdk/blob/6ec36d348b1eaeedb993a905e42650242fac0918/src/hotspot/share/utilities/debug.cpp#L583-L603 
>> 
>> This REF improves these functions by:
>> 
>> - Sorting the names of classes and methods
>> - Allow "." to be used in class names. So both `findclass("java.lang.Object")` and `findclass("java/lang/Object")` would work
>> - Print the C++/Java objects that represent classes and methods.
>
> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into 8373615-improve-findclass-and-findmethod
>  - Fixed regex test problems on Windows
>  - Fixed test and added more test cases
>  - sort includes
>  - @ashu-mehra and @matias9927 review comments
>  - 8373615: Improve HotSpot debug functions findclass() and findmethod

Thanks for fixing the gtest, approved again

-------------

Marked as reviewed by matsaave (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28796#pullrequestreview-3580136652


More information about the hotspot-runtime-dev mailing list