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

Roman Kennke rkennke at redhat.com
Tue Aug 13 11:31:31 UTC 2019


>>>> 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

Yes, looks good now. Thanks!
Roman



More information about the shenandoah-dev mailing list