RFR: 8261492: Shenandoah: reconsider forwardee accesses memory ordering [v2]

Aleksey Shipilev shade at openjdk.java.net
Thu Feb 11 14:07:59 UTC 2021


On Thu, 11 Feb 2021 13:39:42 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp line 43:
>> 
>>> 41:   // fwdptr. That object is still not forwarded, and we need to return
>>> 42:   // the object itself.
>>> 43:   markWord mark = obj->mark_acquire();
>> 
>> We also need the acquire barrier in fast path in generated code, right?
>
> Dang. I thought the beauty of self-fixing barriers is that we moved all fwdptr accesses to C++ (either GC or LRB), and all of them end up in this file. But there is `ShenandoahBarrierSetAssembler::cmpxchg_oop` that accesses the fwdptr directly. I shall see what can be done there.

I believe only AArch64 needs a fix. x86_64 already has a strong semantics. See new commit.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2496


More information about the shenandoah-dev mailing list