RFR: 8318776: Require supports_cx8 to always be true
David Holmes
dholmes at openjdk.org
Mon Nov 13 04:44:09 UTC 2023
As discussed in JBS all platforms (some tweaks to Zero are in progress) actually do support `cx8` i.e. 64-bit compare-and-exchange, so we can strip out the locked-based alternatives to using it and just add a guarantee that it is true at runtime. And all platforms except some ARM variants set `SUPPORTS_NATIVE_CX8`, so we can greatly simplify things. Summary of changes:
- `_supports_cx8` field is only needed when `SUPPORTS_NATIVE_CX8` is not defined
- Assertions for `supports_cx8()` are removed
- Access backend is greatly simplified without the need for lock-based alternative
- `java.util.concurrent.AtomicLongFieldUpdater` is simplified without the need for a lock-based alternative
I did consider moving all the ARM `kuser_helper` related code to be only defined when `SUPPORTS_NATIVE_CX8` is not defined, but there was a theoretical risk this could change the behaviour if ARMv7 binaries were run on other ARM CPU's. I added a note to that effect in vm_version_linux_arm32.cpp so the ARM port maintainers could clean this up further if desired.
Testing:
- All Oracle tiers 1-5 builds (which includes an ARMv7 build)
- GHA builds/tests
- Oracle tiers 1-3 sanity testing
Zero changes coming in via [JDK-8319777](https://bugs.openjdk.org/browse/JDK-8319777) will be merged when they arrive.
Thanks.
-------------
Commit messages:
- 8318776: Require supports_cx8 to always be true
Changes: https://git.openjdk.org/jdk/pull/16625/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16625&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8318776
Stats: 386 lines in 35 files changed: 14 ins; 359 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/16625.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16625/head:pull/16625
PR: https://git.openjdk.org/jdk/pull/16625
More information about the build-dev
mailing list