RFR: 8316961: Fallback implementations for 64-bit Atomic::{add,xchg} on 32-bit platforms

Erik Österlund eosterlund at openjdk.org
Wed Oct 18 21:00:47 UTC 2023


On Wed, 18 Oct 2023 18:58:58 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the bug for rationale. Looks like there is enough infrastructure to achieve what we want without significant fan-out. I checked all `atomic_*.hpp` headers for unimplemented `PlatformAdd<8>` and `PlatformXchg<8>`, and only these seem to be affected.
> 
> Unfortunately, we cannot test these apart from the existing gtest.
> 
> Additional testing:
>  - [x] linux-x86-server-fastdebug, atomic tests pass
>  - [ ] linux-arm-server-fastdebug, atomic tests pass

Having monotonic counters tends to require 64 bits. I have pulled my hair out so many times that we can't have atomic monotonic counters because of the lack of 32 bit platform support for it. The fix looks great, thanks for fixing!

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

Marked as reviewed by eosterlund (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16252#pullrequestreview-1686131973


More information about the hotspot-dev mailing list