RFR: 8369190: JavaFrameAnchor on AArch64 has unnecessary barriers and wrong store order in MacroAssembler [v4]

Justin King jcking at openjdk.org
Mon Oct 6 19:58:50 UTC 2025


On Mon, 6 Oct 2025 19:43:02 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp line 44:
>> 
>>> 42:     // clearing _last_Java_sp must be first
>>> 43:     _last_Java_sp = nullptr;
>>> 44:     OrderAccess::release();
>> 
>> You still need a compiler fence here.
>
> Maybe not, if this is the same thread as readers. I don't know what it's for.

`OrderAccess::release()` is more than a compiler barrier on AArch64. I am guessing this was copied from x86 or one of the others where that same function is a compiler barrier? Should I move `compiler_barrier` from the random source files its in, into globalDefinitions, and use that?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27645#discussion_r2408246891


More information about the hotspot-dev mailing list