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

Ioi Lam iklam at openjdk.org
Fri Dec 12 23:26:27 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.

Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:

 - sort includes
 - @ashu-mehra and @matias9927 review comments

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28796/files
  - new: https://git.openjdk.org/jdk/pull/28796/files/14e1b9dc..5b2504ad

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28796&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28796&range=00-01

  Stats: 57 lines in 2 files changed: 6 ins; 5 del; 46 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