RFR (S) 8229419: Shenandoah: Cleanup LRB strength selector code

Aleksey Shipilev shade at redhat.com
Tue Aug 13 11:09:57 UTC 2019


On 8/12/19 9:53 PM, Roman Kennke wrote:
>>> RFE:
>>>  https://bugs.openjdk.java.net/browse/JDK-8229419
>>>  https://cr.openjdk.java.net/~shade/8229419/webrev.01/
>>
>> https://cr.openjdk.java.net/~shade/8229419/webrev.02/
>>
>> Last minute cleanup:
>>  - invert Op_CmpP condition from && to ||, makes simpler statement;
>>  - return strength=NONE from "Do not need barriers" block;
> 
> This is wrong, IMO. For several uses of a barrier we want the strongest
> one. Returning NONE means 'there is no stronger use than NONE'. If the
> next sibling would be STRONG, then we'd elide the barrier even though we
> must not. Please leave the previous "// NONE, i.e. leave current
> strength as is".

Right! I don't think previous patch was incorrect, because it would exit the loop on first encounter
of STRONG, and would not exit with NONE. But it could be more sane to never downgrade the strength.

Update:
  https://cr.openjdk.java.net/~shade/8229419/webrev.03/

Testing: hotspot_gc_shenandoah, C1/C2 CTW tests

-- 
Thanks,
-Aleksey



More information about the shenandoah-dev mailing list