RFR: 8321371: SpinPause() not implemented for bsd_aarch64/macOS

Fredrik Bredberg fbredberg at openjdk.org
Wed Dec 13 11:04:41 UTC 2023


On Wed, 13 Dec 2023 10:49:23 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> The SpinPause() function only returns 0 on bsd_aarch64 (i.e. macOS)
>> 
>> This PR initially meant to implement SpinPause() for macOS on AArch64 by copying the source from linux_aarch64, but after having some internal discussions, it seems like the most reasonable thing to do is to implement SpinPause() using a single inline yield instruction.
>> 
>> Tested successfully on macosx-aarch64 tier1-tier5.
>
> The better way to find out an instruction to use is to run microbenchmarks/benchmarks. See #6803.

Hi @eastig,

I initially did the things you suggest, but after some internal discussions changed the implementation into a single yield instruction.
See JDK-8321371 for more background information.

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

PR Comment: https://git.openjdk.org/jdk/pull/16994#issuecomment-1853702671


More information about the hotspot-runtime-dev mailing list