[jdk11u-dev] RFR: 8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent

Aleksey Shipilev shade at openjdk.java.net
Wed Aug 25 15:14:24 UTC 2021


On Tue, 24 Aug 2021 15:51:28 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Unclean backport to fix Shenandoah AArch64 bug. The patch does not apply cleanly, because there is a trivial conflict in a copyright line. Then it fails to build, because the check in `LIR_OpShenandoahCompareAndSwap::emit_code` should match the 11u version.
> 
> In JDK mainline:
> 
> 
> void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, * info) {
>   ....
>   if (!CompilerConfig::is_c1_only_no_jvmci()) {
>     __ membar();
>   }
>   __ volatile_load_mem_reg(address, result, info);
> }
> ...
> void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
>   ...
>   if (CompilerConfig::is_c1_only_no_jvmci()) {
>     ...
>     __ membar(__ AnyAny);
>   }
> }
> 
> 
> In JDK 11u (this PR):
> 
> 
> void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
>                                        CodeEmitInfo* info) {
>   ...
>   if (! UseBarriersForVolatile) {
>     __ membar();
>   }
>    __ volatile_load_mem_reg(address, result, info);
> }
> 
> void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
>   ...
>   if (UseBarriersForVolatile) {
>      ...
>      __ membar(__ AnyAny);
>   }
> }
> 
> 
> Additional testing:
>  - [x] Linux AArch64 hotspot_gc_shenandoah
>  - [x] Linux AArch64 tier1 with -XX:+UseShenandoahGC
>  - [x] Linux AArch64 tier2 with -XX:+UseShenandoahGC
>  - [x] Linux AArch64 jcstress -m quick with -XX:+UseShenandoahGC

Got the push approval.

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

PR: https://git.openjdk.java.net/jdk11u-dev/pull/289


More information about the jdk-updates-dev mailing list