RFR: 8365799: AArch64: Remove trailing DMB from cmpxchgptr for LSE [v2]

Ruben duke at openjdk.org
Tue Nov 4 07:14:09 UTC 2025


On Thu, 21 Aug 2025 08:13:50 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> You're right, it is a little inaccurate to use the Java API to determine what `cmpxchgptr` does. Although the original intent to remove the membar is still functionality correct.
>> 
>> Although looking into it more, it seems that `cmpxchgptr` can now be removed completely. The recent PR https://github.com/openjdk/jdk/pull/26594 removed two of its call sites, and the only other existing one is within `MacroAssembler::cmpxchg_obj_header` - a method which never gets called to.
>> 
>> So I propose:
>> - We close this pr
>> - Open new one which removes the methods `MacroAssembler::cmpxchg_obj_header`, `MacroAssembler::cmpxchgptr` and `MacroAssembler::cmpxchgw` completely since they are no longer called to from anywhere.
>
>> * We close this pr
>> 
>> * Open new one which removes the methods `MacroAssembler::cmpxchg_obj_header`, `MacroAssembler::cmpxchgptr` and `MacroAssembler::cmpxchgw` completely since they are no longer called to from anywhere.
> 
> If you like, although we can (and we should) tidy up as we go along.

Hi @theRealAph,
I've pushed changes to remove the unused cmpxchg* functions to https://github.com/openjdk/jdk/compare/master...ruben-arm:jdk:pr-8365799 as Samuel is currently not available. Once he is back, he can update this PR's branch.
However, as this is a different scope from the original JBS ticket https://bugs.openjdk.org/browse/JDK-8365799, should we create a new one?

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

PR Comment: https://git.openjdk.org/jdk/pull/26845#issuecomment-3481358544


More information about the hotspot-dev mailing list