RFR: 8368303: AlwaysAtomicAccesses is excessively strict [v2]
Dean Long
dlong at openjdk.org
Thu Oct 2 22:26:46 UTC 2025
On Thu, 2 Oct 2025 17:14:41 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> In C1, the experimental flag `AlwaysAtomicAccesses` treats accesses to all fields as if they were volatile fields. This is correct but excessive: we only need single-copy atomicity to satisfy `AlwaysAtomicAccesses`.
>>
>> We need this in order to allow progress on JDK-8365147.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>
> Next try
Marked as reviewed by dlong (Reviewer).
src/hotspot/share/gc/shared/c1/barrierSetC1.cpp line 45:
> 43: // The JMM requires atomicity for all accesses to fields of primitive
> 44: // types other than double and long. In practice, HotSpot assumes that
> 45: // on all all processors, accesses to memory operands of wordSize and
Suggestion:
// on all processors, accesses to memory operands of wordSize and
-------------
PR Review: https://git.openjdk.org/jdk/pull/27432#pullrequestreview-3296669072
PR Review Comment: https://git.openjdk.org/jdk/pull/27432#discussion_r2400254515
More information about the hotspot-dev
mailing list