RFR: Uses keep_alive_barrier to keep deduped char array alive
Zhengyu Gu
zgu at redhat.com
Wed Oct 11 19:34:38 UTC 2017
> Also, the whole block:
>
> 384 if (UseShenandoahGC) {
> 385 oopDesc::bs()->keep_alive_barrier(existing_value);
> 386 existing_value =
> (typeArrayOop)oopDesc::bs()->read_barrier(existing_value);
> 387 } else {
> 388 // Enqueue the reference to make sure it is kept alive. Concurrent mark might
> 389 // otherwise declare it dead if there are no other strong references to this object.
> 390 G1SATBCardTableModRefBS::enqueue(existing_value);
> 391 } Should be just: oopDesc::bs()->keep_alive_barrier(existing_value);
>
> For G1 and Shenandoah under conc-mark, this enqueues the object in SATB,
> for Shenandoah under conc-partial it does the WB. As I said above, I
> don't think the RB is needed. I would be very surprised.
>
Ok, let me clear my thoughts here.
If we do SATB barrier, that will ensure existing_value alive.
However, if we do keep_alive_barrier, the existing_value could be
evacuated, but we still hold old oop here, right? then we can end up
dead oop after recycle?
-Zhengyu
> Roman
More information about the shenandoah-dev
mailing list