JDK-8275728 : Add simple Producer/Consumer microbenchmark for Thread.onSpinWait
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-10-21
  • Updated: 2022-04-21
  • Resolved: 2021-11-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b24Fixed
Description
From https://mail.openjdk.java.net/pipermail/hotspot-dev/2021-August/054033.html:

"a SynchronousQueue microbenchmark (you can find it in https://bugs.openjdk.java.net/browse/JDK-8267502).... The SynchronousQueue microbenchmark, which uses Thread.onSpinWait, got 2.9x improvement."

Since jdk17 java.util.concurrent.SynchronousQueue has not been using Thread.onSpinWait. Because of this the microbenchmark shows no improvements.

A microbenchmark for the approach used in jdk11 java.util.concurrent.SynchronousQueue can be added.

Comments
Changeset: 6954b98f Author: Evgeny Astigeevich <eastig@amazon.com> Committer: Paul Hohensee <phh@openjdk.org> Date: 2021-11-11 22:23:35 +0000 URL: https://git.openjdk.java.net/jdk/commit/6954b98f8faf29b6c2d13687a7a94e83302bdd85
12-11-2021