RFR (S) 8252043: Move inner class metaspace cleaning out of safepoint cleanup tasks

Coleen Phillimore coleen.phillimore at oracle.com
Thu Aug 20 21:43:35 UTC 2020



On 8/20/20 5:11 PM, Patricio Chilano wrote:
> Hi Coleen,
>
> Changes look good to me.
> I think you could have also just checked for 
> SafepointSynchronize::is_at_safepoint() in 
> ClassLoaderDataGraph::purge() instead of having the caller figure it 
> out. I see that for all the current callers the value is always 
> constant though so you save that check I guess.

Actually it turns out that CLDG::purge() is called concurrently by ZGC 
in a non-Java thread, so calling SafepointSynchronize::is_at_safepoint() 
may be true but the safepoint can end while the purging thread is 
running.  I had the code that way and it failed with ZGC.
Thanks for reviewing.
Coleen

>
> Thanks,
> Patricio
> On 8/19/20 6:47 PM, Coleen Phillimore wrote:
>> Summary: Clean up inner metaspaces from ServiceThread if cleanup is 
>> needed for concurrent GCs.
>>
>> Moved inner metaspace cleaning back to class unloading, unless using 
>> concurrent GC.  There we initiate a safepoint if inner metaspaces 
>> require cleaning.
>>
>> Tested with tier1-6.
>>
>> open webrev at 
>> http://cr.openjdk.java.net/~coleenp/2020/8252043.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8252043
>>
>> Thanks,
>> Coleen
>



More information about the hotspot-runtime-dev mailing list