RFR: 8356556: AArch64: No need for acquire fence in safepoint poll in FFM
David Holmes
dholmes at openjdk.org
Tue Jun 17 05:23:31 UTC 2025
On Mon, 16 Jun 2025 13:03:11 GMT, Anton Artemov <duke at openjdk.org> wrote:
> Hi, please consider the following changes:
>
> On AArch64, the `acquire` bool argument of the `safepoint_poll()` method is removed, as the load-acquire `ldar` instruction in the `safepoint_poll()` implementation is not needed completely. It was used for observing the disarmed value when VMThread was used to disarm the Java threads, but currently JavaThreads disarm themselves.
>
> Tested in tiers 1 - 4.
Overall looks good, but one nit.
Thanks
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 558:
> 556: void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp) {
> 557:
> 558: // No need for acquire fence as java threads disarm themselves, ldar not needed.
The comment explains the difference between the old and new code, but loses that context outside of the PR. I don't think you need to say anything here.
-------------
Changes requested by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25829#pullrequestreview-2934153072
PR Review Comment: https://git.openjdk.org/jdk/pull/25829#discussion_r2151333073
More information about the hotspot-dev
mailing list