On Tue, 9 Jun 2026 08:42:57 GMT, Kevin Walls <[email protected]> wrote:
>> src/hotspot/share/services/diagnosticCommand.cpp line 975:
>>
>>> 973: _out->print_cr("\n%d classes shared from static cache: %s",
>>> closure._aot_statics, FileMapInfo::current_info()->full_path());
>>> 974: if (closure._aot_dynamics > 0)
>>> 975: _out->print_cr("\n%d classes shared from dynamic cache: %s",
>>> closure._aot_dynamics, FileMapInfo::dynamic_info()->full_path());
>>
>> Suggestion:
>>
>> if (closure._aot_statics > 0) {
>> _out->print_cr();
>> _out->print_cr("%d classes shared from static cache: %s",
>> closure._aot_statics, FileMapInfo::current_info()->full_path());
>> }
>> if (closure._aot_dynamics > 0) {
>> _out->print_cr();
>> _out->print_cr("%d classes shared from dynamic cache: %s",
>> closure._aot_dynamics, FileMapInfo::dynamic_info()->full_path());
>> }
>
> Will add the braces for clarity. Not sure about the extra newlines, currently
> it looks like:
>
> $ jcmd pid VM.classes -location
> ...
> 0x00000000541bdc00 65 [Ljava.lang.Object;
> 0x00000000541bd800 67 fully_initialized fWSs java.lang.Object
>
> 427 classes shared from static cache:
> /work/repos/personal/jdk/build/linux-x64/images/jdk/lib/server/classes.jsa
> $
I think it is better to add new line here because they are statistics for AOT
cache, not class data.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31420#discussion_r3379233163