RFR: 8359435: AArch64: add support for SB instruction to MacroAssembler::spin_wait

Andrew Haley aph at openjdk.org
Thu Jun 26 08:05:31 UTC 2025


On Thu, 26 Jun 2025 07:55:50 GMT, Andrew Haley <aph at openjdk.org> wrote:

>>> I'm still waiting for a use for this thing.
>> 
>> The other project reports Evgeny linked in PR body look pretty convincing, as well as `ThreadOnSpinWait` microbenchmarks we have as well. This PR does not propose to _switch_ to `SB` for spin-waits, AFAICS. Just having `SB` as the spin-wait option does look fine to me.
>
>> > I'm still waiting for a use for this thing.
>> 
>> The other project reports Evgeny linked in PR body look pretty convincing, as well as `ThreadOnSpinWait` microbenchmarks we have as well. This PR does not propose to _switch_ to `SB` for spin-waits, AFAICS. Just having `SB` as the spin-wait option does look fine to me.
> 
> I understand, but I see above here, "I am flexible to have it either way." Are you changing your mind? There is no reason not to add the instruction with the patch that uses it, as has been the practice for this port.

> > > Looks okay to me. @theRealAph should also take a look.
> > 
> > 
> > I'm still waiting for a use for this thing. Then we'll be able to see it in action.
> 
> Do you mean we need real-life workloads relying on `j.l.Thread.onSpinWait` to show improvements?

There is no need for this PR to be pushed until the onSpinWait change: there is literally no other use for it.

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

PR Comment: https://git.openjdk.org/jdk/pull/25801#issuecomment-3007570142


More information about the hotspot-compiler-dev mailing list