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

Per Liden per.liden at oracle.com
Tue Dec 4 07:54:03 UTC 2018


On 11/30/18 1:45 PM, Erik Österlund wrote:
> 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/

Looks good.

/Per


More information about the hotspot-runtime-dev mailing list