RFR(M) 8222992: Shenandoah: Pre-evacuate all roots

Zhengyu Gu zgu at redhat.com
Tue Apr 30 19:51:20 UTC 2019



On 4/30/19 10:25 AM, Aleksey Shipilev wrote:
> On 4/26/19 3:54 PM, Zhengyu Gu wrote:
>>> *) There is a plain store in ShenandoahBarrierSet::AccessBarrier<decorators,
>>> BarrierSetT>::oop_load_not_in_heap. First, I wonder if it even makes sense to do it here -- it feels
>>> awkward to have writes in "loads". Second, shouldn't that be a CAS, on the off-chance something else
>>> is storing the another value?
>>
>> I think it is a Copy-on-Read semantics, no? I don't think it needs CAS here, since
>> load-reference-barrier should return to-space oop, and we should only have one to-space copy.
> 
> Yes, but the issue is different. You have the conflicting stores: a) fwd fixup: A' -> A; b) other
> store B. What this can do is to store A, overwriting (losing!) the store of B. Rule: the fwd fixups
> should always be with CAS, unless you guarantee nothing else is writing.

You are right, I reverted the changes. Also, as you suggested offline, I 
folded verify roots into shenandoah verifier and added missing roots in
ShenandoahRootProcessor::process_all_roots_slow()

Updated webrev: 
http://cr.openjdk.java.net/~zgu/JDK-8222992/webrev.01/index.html

Test:
   hotspot_gc_shenandoah (fastdebug and release) with -XX:+ShenandoahVerify.


Thanks,

-Zhengyu







> 
> -Aleksey
> 



More information about the hotspot-gc-dev mailing list