RFR 8243572: Multiple tests fail with assert(cld->klasses() != 0LL) failed: unexpected NULL for cld->klasses()

Mandy Chung mandy.chung at oracle.com
Tue Apr 28 20:10:03 UTC 2020

We need to have a better description for the users to tell what these 
statistics mean.   This is about the metaspace space for classes which 
does not have a strong relationship with its defining loader, meaning 
that they can be unloaded aggressively while its defining loader is 
still alive.   It's defined in ClassOption::STRONG [1] and users can 
refer to its specification. "non-strong" is the best term I can come up 
with.  Maybe Markus has other suggestion.

ClassLoaderStats::_hidden_classes_count should be renamed to indicate 
that it does not count all hidden classes.


On 4/28/20 12:54 PM, Harold Seigel wrote:
> Klass::is_non_strong_hidden() is a function that is internal to the 
> JVM, not visible to users.  I think users should see either 'hidden' 
> or 'strong hidden', and not the awkward term 'non strong hidden'.
> Harold
> On 4/28/2020 3:47 PM, Mandy Chung wrote:
>> On 4/28/20 12:42 PM, Harold Seigel wrote:
>>> Hi Mandy,
>>> Thanks for the review.
>>> I thought that the term 'hidden classes' referred to weak hidden 
>>> classes and we would use the term 'strong hidden classes' to refer 
>>> to hidden classes that were not weak. Hence, I don't think we need 
>>> to change 'hidden_classes...' to 'non_strong_hidden_classes...'.
>>> Also, I think that 'non_strong_hidden_classes' sounds really awkward 
>>> and would prefer to either leave it as is or change to 
>>> 'weak_hidden_classes'.
>> It's an existing term: Klass::is_non_strong_hidden.   We no longer 
>> refer to "weak hidden classes".
>> Mandy
>>> Does that sound okay?
>>> Thanks, Harold
>>> On 4/28/2020 3:36 PM, Mandy Chung wrote:
>>>> Hi Harold,
>>>> On 4/28/20 10:27 AM, Harold Seigel wrote:
>>>>> :
>>>>> Open Webrev: 
>>>>> http://cr.openjdk.java.net/~hseigel/bug_8243572/webrev/index.html
>>>> This patch looks okay in general.  JFR is tracking the classes 
>>>> loaded that has no strong relationship with any class loader.  VM 
>>>> implementation calls such CLD that has a class mirror.  In other 
>>>> words, it is only tracking the hidden classes defined with the 
>>>> default option.
>>>> So some suggestion:
>>>> classLoaderStats.hpp
>>>>    82   uintx             _hidden_classes_count;
>>>> rename this on to non_strong_hidden_classes_count
>>>> src/hotspot/share/jfr/metadata/metadata.xml
>>>>   221     <Field type="boolean" name="hiddenClassLoader" label="Hidden Class Loader" />
>>>> There is no such thing called "hidden class loader".  Perhaps simply "hidden classes"?
>>>>   727     <Field type="long" name="hiddenClassCount" label="Hidden Classes" description="Number of hidden classes" />
>>>>   728     <Field type="ulong" contentType="bytes" name="hiddenChunkSize" label="Total Hidden Classes Chunk Size"
>>>>   729       description="Total size of all allocated metaspace chunks for hidden classes (each chunk has several blocks)" />
>>>>   730     <Field type="ulong" contentType="bytes" name="hiddenBlockSize" label="Total Hidden Classes Block Size"
>>>>   731       description="Total size of all allocated metaspace blocks for hidden classes (each chunk has several blocks)" />
>>>> what about s/hidden classes/non-strong hidden classes/?
>>>> Mandy

More information about the hotspot-runtime-dev mailing list