RFR 8224875: Shenandoah: ParallelCleaning code unloading should take lock to protect shared code roots array

Zhengyu Gu zgu at redhat.com
Wed May 29 11:40:58 UTC 2019



On 5/29/19 7:31 AM, Aleksey Shipilev wrote:
> On 5/29/19 1:29 PM, Zhengyu Gu wrote:
>>> *) Since you moved the assert in ShenandoahCodeRoots::remove_nmethod, is it worth it to move it in
>>> ShenandoahCodeRoots::add_nmethod too?
>>>
>> Sure.
> 
> So... should we make (add|remove)_nmethod symmetrical? If remove_* can acquire the lock, then add_*
> should do that too?
I don't think add_nmethod needs additional lock, cause it is always 
called with CodeCache_lock outside safepoints. The new lock only 
protects concurrent workers when unregister nmethods during safepoint 
cleanup.

> 
>> Updated webrev: http://cr.openjdk.java.net/~zgu/JDK-8224875/webrev.01/
> 
> Otherwise good.

Thanks,

-Zhengyu

> 
> -Aleksey
> 



More information about the hotspot-gc-dev mailing list