RFR: 8373615: Improve HotSpot debug functions findclass() and findmethod
Ioi Lam
iklam at openjdk.org
Fri Dec 12 16:48:25 UTC 2025
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.
-------------
Commit messages:
- 8373615: Improve HotSpot debug functions findclass() and findmethod
Changes: https://git.openjdk.org/jdk/pull/28796/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28796&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373615
Stats: 100 lines in 2 files changed: 90 ins; 4 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/28796.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28796/head:pull/28796
PR: https://git.openjdk.org/jdk/pull/28796
More information about the hotspot-runtime-dev
mailing list