RFR: 8261649: AArch64: Optimize LSE atomics in C++ code

Andrew Haley aph at openjdk.java.net
Thu Feb 18 09:18:40 UTC 2021


On Wed, 17 Feb 2021 17:48:06 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> 8261649: AArch64: Optimize LSE atomics in C++ code
>
> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5651:
> 
>> 5649:     __ mov(prev, compare_val);
>> 5650:     __ lse_cas(prev, exchange_val, ptr, size, acquire, release, /*not_pair*/true);
>> 5651:     if (acquire && release) {
> 
> These two flags are only ever passed as true,true or false,false. Does any other combination make sense? If not then should you not be using a single flag? or at least asserting (pro tem) that they are both equal?

Today HotSpot only really supports mo_conservative and mo_relaxed, but there are many where release on its own would make sense; I think Aleksey  recently found some. Having said that, it would be clearer here to expose mo_conservative as well. I'll do so.

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

PR: https://git.openjdk.java.net/jdk/pull/2611


More information about the hotspot-dev mailing list