RFR: JDK-8221766: Load-reference barriers for Shenandoah

Andrew Haley aph at redhat.com
Mon Apr 8 08:28:59 UTC 2019

On 4/7/19 7:18 PM, Roman Kennke wrote:
> On 4/2/19 10:12 PM, Roman Kennke wrote:
>>> - No more need for object equals barriers.
>> I'm pleased about that. I really hated the AArch64 Shenandoah CAS!
> I'm sorry to disappoint you, but the CAS barrier is still needed. The
> memory location may still legally hold a from-space reference, and
> comparing that to a to-space reference needs some special care. And
> yes, ZGC has a similar problem as far as I know.

That's interesting. Could we not simply promote the reference in the
reference field we're CASing, then do a normal CAS?

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the compiler-dev mailing list