RFR: 8373615: Improve HotSpot debug functions findclass() and findmethod [v2]
Ioi Lam
iklam at openjdk.org
Fri Dec 12 23:26:30 UTC 2025
On Fri, 12 Dec 2025 20:36:18 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - sort includes
>> - @ashu-mehra and @matias9927 review comments
>
> src/hotspot/share/classfile/classPrinter.cpp line 96:
>
>> 94: return;
>> 95: }
>> 96: _klasses.append(InstanceKlass::cast(k));
>
> It doesn't really matter much as these are for debugging, but it would be more efficient if filtering based on `_class_name_pattern` is done here before adding the class to the array.
Fixed
> src/hotspot/share/classfile/classPrinter.cpp line 164:
>
>> 162: oop mirror = ik->java_mirror();
>> 163: if (mirror != nullptr) {
>> 164: _st->print("\nJava mirror oop for %s: ", ik->name()->as_C_string());
>
> Indentation is off
Fixed
> src/hotspot/share/classfile/classPrinter.hpp line 56:
>
>> 54: PRINT_METHOD_HANDLE = 1 << 4, // extra information for invokehandle
>> 55: PRINT_CLASS_DETAILS = 1 << 5, // print details of the C++ and Java objects that represent classes
>> 56: PRINT_METHOD_DETAILS = 1 << 6, // print details of the C++ that represent methods
>
> Suggestion:
>
> PRINT_METHOD_DETAILS = 1 << 6, // print details of the C++ objects that represent methods
Fixed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28796#discussion_r2615831157
PR Review Comment: https://git.openjdk.org/jdk/pull/28796#discussion_r2615831190
PR Review Comment: https://git.openjdk.org/jdk/pull/28796#discussion_r2615831136
More information about the hotspot-runtime-dev
mailing list