RFR: 7903492: JMH: Infrastructure code should yield occasionally for virtual executor to make progress

Aleksey Shipilev shade at openjdk.org
Thu Jun 8 16:07:22 UTC 2023


Virtual executor can starved out by JMH infra code that busy loops. GHAs that are running with low core machines, where we see occasional timeouts with tests that do not make progress on their own. One of those tests require an explicit `Thread.yield` in its busy loop.

This also affects the actual measurement loop, I think, but working it out regressing performance for every other executor would take a while. It would also be arguably a broken benchmark to try and run with more threads than the platform threads are available.

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

Commit messages:
 - Deletes
 - Touchups
 - Fix

Changes: https://git.openjdk.org/jmh/pull/111/files
 Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=111&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903492
  Stats: 30 lines in 4 files changed: 25 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jmh/pull/111.diff
  Fetch: git fetch https://git.openjdk.org/jmh.git pull/111/head:pull/111

PR: https://git.openjdk.org/jmh/pull/111


More information about the jmh-dev mailing list