RFR: 8343249: [Windows] Implement SpinPause [v4]

Saint Wesonga swesonga at openjdk.org
Thu Jan 15 07:27:27 UTC 2026


On Thu, 15 Jan 2026 05:45:40 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > I don't know if this changes your opinion here but the `-XX:OnSpinWaitInst` and `-XX:OnSpinWaitInstCount` flags are not respected on Windows AArch64 without the AArch64 change in this PR.
> 
> AFAICS they are still respected, just not used in relation to `SpinPause`.

An example of a scenario of where these flags should have an effect but don't on Windows AArch64 is when [ObjectMonitor::try_spin](https://github.com/openjdk/jdk/blob/b6b337926d5f13ee2bca12ea94530ea59911ff2f/src/hotspot/share/runtime/objectMonitor.cpp#L2448) calls SpinPause. The StubRoutines::aarch64::spin_wait() stub will have the correct number of the specified instruction but won't be invoked at all without this change (unless I'm missing something).

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

PR Comment: https://git.openjdk.org/jdk/pull/21781#issuecomment-3753222079


More information about the hotspot-runtime-dev mailing list