RFR: 8275775: Add jcmd VM.classes to print details of all classes [v2]

Yi Yang yyang at openjdk.java.net
Wed Jan 19 02:24:32 UTC 2022


On Tue, 18 Jan 2022 03:04:15 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Yi Yang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   8275775 Add VM.classes to print details of all classes
>
> src/hotspot/share/oops/instanceKlass.cpp line 2103:
> 
>> 2101:   if (k->has_final_method()) buf[i++] = 'f';
>> 2102:   if (k->has_vanilla_constructor()) buf[i++] = 'V';
>> 2103:   if (k->is_instance_klass()) {
> 
> Don't the properties queried in L2100 to L2102 only apply to instance classes?

These methods belong to `Klass`

> src/hotspot/share/services/diagnosticCommand.hpp line 873:
> 
>> 871:   }
>> 872:   static const char* impact() {
>> 873:       return "Medium: Depends on Java content.";
> 
> I would think impact is High due to the number of classes.

Thanks for reviews! Since ClassHierarchyDCmd uses `"Medium: Depends on number of loaded classes."`, so I'm going to change the impact description but keeping as `Medium` level. Now it looks like:

KlassAddr           Size  State                 Flags    LoaderName    ClassName  
0x0000000800c0b400  62    fully_initialized     W        bootstrap     java.lang.invoke.LambdaForm$MH/0x0000000800c0b400  
0x0000000800c0b000  62    fully_initialized     W        bootstrap     java.lang.invoke.LambdaForm$DMH/0x0000000800c0b000  
0x0000000800c0ac00  62    fully_initialized     W        bootstrap     java.lang.invoke.LambdaForm$MH/0x0000000800c0ac00  
0x0000000800c0a800  62    fully_initialized     W        bootstrap     java.lang.invoke.LambdaForm$MH/0x0000000800c0a800  
0x0000000800c0a400  62    fully_initialized     W        bootstrap     java.lang.invoke.LambdaForm$MH/0x0000000800c0a400

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

PR: https://git.openjdk.java.net/jdk/pull/7105


More information about the serviceability-dev mailing list