JDK-8307495 : Specialize atomic bitset functions for aix-ppc
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: aix
  • CPU: ppc
  • Submitted: 2023-05-04
  • Updated: 2025-12-03
  • Resolved: 2025-10-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25 JDK 26
25.0.3Fixed 26 b20Fixed
Related Reports
Causes :  
Relates :  
Description
JDK-8293117 added a suite of atomic operations for manipulating integer values representing bitsets. The default implementation provided there uses a loop over Atomic::cmpxchg. It also provided a mechanism for specializing the implementation by platform-specific code. We should provide such a specialization for the platform named in the summary, if that's possible.  (If there isn't a better implementation then this issue can just be closed.)

Comments
Fix Request (jdk25u-dev): The original issue is actually a P4 enhancement which we would normally not backport. However, the change contains fixes in PlatformCmpxchg<1>. The following issues in the linux implementation have been fixed by this change: 1. compare-exchange with negative compare value was broken. 2. The simple guard got lost which may cause poor performance in case of contention. These 2 bugs were introduced by JDK-8331859 in jdk25. In addition, the new code is better maintainable because it removes duplicated code. That should also simplify future backports. The new code is tested in jdk26 and retested several nights in jdk25u-dev in our nightly tests and there are no known issues. The backport is not clean, but was easy to resolve (only files moved and a class renamed). It has been reviewed.
01-12-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk25u-dev/pull/24 Date: 2025-11-27 13:07:19 +0000
27-11-2025

Changeset: c9cbd31f Branch: master Author: David Briemann <dbriemann@openjdk.org> Date: 2025-10-15 18:29:23 +0000 URL: https://git.openjdk.org/jdk/commit/c9cbd31f8575a25c4decd68dc645378c5ba2bad0
15-10-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27650 Date: 2025-10-06 15:16:26 +0000
08-10-2025

AIX and linux can use the same implementation. The atomics written in inline assembler are identical.
05-09-2023