[11u] RFR: Fix non-Shenandoah builds

Roman Kennke rkennke at redhat.com
Fri Jul 19 17:42:40 UTC 2019


>> I am not sure that the fix is quite right. We do want to exclude this
>> stuff from non-Shenandoah builds methinks. Maybe just move the whole
>> block up a little, so that the trailing || here:
>>
>>>               (bol->in(1)->Opcode() == Op_CompareAndSwapN ) ||
>>
>> ... doesn't end up being the last one?
> 
> Well, I liked the first fix because it matched what jdk/jdk was doing.

Yes, I understand this, but in jdk/jdk Shenandoah is included in
mainline, while in JDK11u we're not, and we want to make it obvious that
we're good.

The proposed change below looks good.

Thanks,
Roman

> We can do this:
> 
> diff -r 59cfe2c1b7ba src/hotspot/share/opto/loopTransform.cpp
> --- a/src/hotspot/share/opto/loopTransform.cpp  Fri Jul 19 17:23:26 2019 +0200
> +++ b/src/hotspot/share/opto/loopTransform.cpp  Fri Jul 19 19:34:14 2019 +0200
> @@ -2779,4 +2779,12 @@
>               (bol->in(1)->Opcode() == Op_StoreIConditional ) ||
>               (bol->in(1)->Opcode() == Op_StoreLConditional ) ||
> +#if INCLUDE_SHENANDOAHGC
> +             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeP ) ||
> +             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeN ) ||
> +             (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapP ) ||
> +             (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapN ) ||
> +             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapP ) ||
> +             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapN ) ||
> +#endif
>               (bol->in(1)->Opcode() == Op_CompareAndExchangeB ) ||
>               (bol->in(1)->Opcode() == Op_CompareAndExchangeS ) ||
> @@ -2796,12 +2804,5 @@
>               (bol->in(1)->Opcode() == Op_CompareAndSwapL ) ||
>               (bol->in(1)->Opcode() == Op_CompareAndSwapP ) ||
> -             (bol->in(1)->Opcode() == Op_CompareAndSwapN ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeP ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeN ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapP ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapN ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapP ) ||
> -             (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapN )
> -             ))
> +             (bol->in(1)->Opcode() == Op_CompareAndSwapN )))
>            return;               // Allocation loops RARELY take backedge
>          // Find the OTHER exit path from the IF
> 
> -Aleksey
> 



More information about the shenandoah-dev mailing list