RFR 8180325: Use ClassLoaderData::classes_do for CDS classes
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Tue May 16 16:59:14 UTC 2017
Thanks Ioi for the review.
On 5/15/17 11:51 AM, Ioi Lam wrote:
> HI Coleen,
>
> The changes look good.
>
> FYI
>
> 1998 void InstanceKlass::remove_unshareable_info() {
> 1999 Klass::remove_unshareable_info();
> 2000
> 2001 if (is_in_error_state()) {
> 2002 // Classes are attempted to link during dumping and may fail,
> 2003 // but these classes are still in the dictionary and class list
> in CLD.
> 2004 // Check in_error state first because in_error is > linked state, so
> 2005 // is_linked() is true.
> 2006 // If there's a linking error, there is nothing else to remove.
> 2007 return;
> 2008 }
> 2009
>
> The above code will be changed to an assert with JDK-8072061
> (Automatically determine optimal sizes for the CDS regions), because
> JDK-8072061 will eliminate all classes in error state.
You might have to explicitly remove this entry from the CLD as well as
the SystemDictionary if this is the case.
thanks,
Coleen
>
> Thanks
> - Ioi
>
> On 5/12/17 3:46 PM, coleen.phillimore at oracle.com wrote:
>> Summary: Use closures and ClassLoaderData::classes_do instead of
>> SystemDictionary::classes_do
>>
>> Migrate CDS code to ClassLoaderData::loaded_classes_do. The
>> loaded_classes_do function should be called without a lock, like the
>> rest of the ClassLoaderData::classes_do functions. Also, I didn't
>> filter anonymous classes with the CDS functions because at the
>> moment, we don't encounter them (there's an assert). If the code
>> changes so that we do encounter them, we might want to link them or
>> decide what to do with them at that time.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8180325.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8180325
>>
>> Tested with nightly rbt run on linux x86, including and additionally
>> all the CDS tests locally.
>>
>> Thanks,
>> Coleen
>>
>
More information about the hotspot-runtime-dev
mailing list