RFR: 8320317: ObjectMonitor NotRunnable is not really an optimization

Daniel D. Daugherty dcubed at openjdk.org
Fri Dec 22 20:58:47 UTC 2023


On Mon, 11 Dec 2023 09:50:37 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

> The performance on stable / reproducible performance tests increase with up to 12% on x86 based platforms if we remove ObjectMonitor::NotRunnable(). The performance decrease seen on AArch64 based macOS can be fixed by implementing SpinPause() (see: JDK-8321371).
> 
> This PR removes ObjectMonitor::NotRunnable().
> 
> Tested successfully on tier1-tier5.

Thumbs up.

If removing `NotRunnable()` resulted in better performance on macosx-aarch64,
that implies that the optimization "worked" for some reason on that platform
while it did not "work" on linux-x64 or windows-x64. The perf comment in the
JBS doesn't mention perf results for macosx-x64 one way or the other.

I understand the `SpinPause()` fix (see: [JDK-8321371](https://bugs.openjdk.org/browse/JDK-8321371))
helps macosx-aarch64, but do we understand exactly what helped
macosx-aarch64 in `NotRunnable()`? Similarly, do we understand exactly
what hurt linux-x64 and windows-x64 in `NotRunnable()`?

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

Marked as reviewed by dcubed (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17050#pullrequestreview-1795129578


More information about the hotspot-runtime-dev mailing list