RFR: 8253469: ARM32 Zero: replace usages of __sync_synchronize() with OrderAccess::fence
David Holmes
dholmes at openjdk.java.net
Fri Sep 25 05:22:24 UTC 2020
On Tue, 22 Sep 2020 12:41:02 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> In `atomic_bsd_zero.hpp` and `atomic_linux_zero.hpp` there are uses of __sync_synchronize(). However,
> `orderAccess_*_zero.hpp` calls the kernel helper, because:
> /*
> * ARM Kernel helper for memory barrier.
> * Using __asm __volatile ("":::"memory") does not work reliable on ARM
> * and gcc __sync_synchronize(); implementation does not use the kernel
> * helper for all gcc versions so it is unreliable to use as well.
> */
>
> We need to clean this up to use `OrderAccess::fence()` to gain access to the kernel helper.
>
> This depends on JDK-8253464 being fixed first.
>
> Attention @bulasevich.
>
> Testing:
> - [x] ARM32 Zero jcstress
> - [x] Mac OS x86_64 Zero jcstress
@shipilev please don't force push commits as it breaks the commit history. There is no way to see what the difference
is between the forced commit and the one it overwrote. That makes it hard for reviewers to follow and could render
existing review comments nonsensical. If you need to merge with latest changes just do a merge in your local branch and
push that commit to your Personal fork. The skara tooling will flatten all commits in the PR into a single simple
commit with just the actual changes you made. Most of the time you don't even need to re-merge with latest changes from
master. Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/298
More information about the hotspot-runtime-dev
mailing list