RFR (S): 8214522: Last runtime locking issues for concurrent class unloading

Erik Österlund erik.osterlund at oracle.com
Fri Nov 30 12:45:19 UTC 2018


Hi,

There are a few asserts and one lock acquisition remaining for 
concurrent class unloading to be happy.

The asserts are changed to comply with SystemDictionary::do_unloading() 
being done concurrently under the CLDG lock, and 
ClassLoaderDataGraph::purge() being called without any locks taken (as 
the data has been unlinked and subsequently had a global handshake 
performed to make sure nobody is looking at the unloading list any longer).

The MetaspaceExpand_lock in 
MetaspaceUtils::find_enclosing_virtual_space() is needed because 
Metaspace::purge() uses the MetaspaceExpand_lock, and reads are not safe 
without this lock. This lock was in Coleens original webrev last sweep, 
but when I was asked why we needed it, I did not remember why so we 
decided to leave it out until I could remember why I added that. This is 
why.

Bugs:
https://bugs.openjdk.java.net/browse/JDK-8214522

Webrev:
http://cr.openjdk.java.net/~eosterlund/8214522/webrev.00/

Thanks,
/Erik


More information about the hotspot-runtime-dev mailing list