RFR: 8332082: Shenandoah: Use SATB active flag for C2 pre-write barrier on x86 and PPC

Aleksey Shipilev shade at openjdk.org
Mon May 13 11:26:09 UTC 2024


On Fri, 10 May 2024 16:13:51 GMT, William Kemper <wkemper at openjdk.org> wrote:

> This is consistent with c1 and other platforms.

I agree there is an inconsistency, but I also see it is deeper than just these two.
https://github.com/openjdk/jdk/blob/1484153c1a092cefc20270b35aa1e508280843a4/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp#L696-L698

Before we go hard on either gc-state or SATB "active" flag, let's decide which way we go?

The underlying issue, IIRC, was that hardly any other GC implementation has a GC state flag, so they are forced to use the SATB "active" flags. But I am thinking that testing the gc-state flag is better on these paths, since the gc-state flag is guaranteed to be uncontended and fast-accessible.

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

PR Review: https://git.openjdk.org/jdk/pull/19180#pullrequestreview-2052409802


More information about the shenandoah-dev mailing list