RFR: 8305670: Performance regression in LockSupport.unpark with lots of idle threads

Daniel D. Daugherty dcubed at openjdk.org
Fri Apr 7 20:14:39 UTC 2023


A trivial fix to only check the ThreadsList in a `ThreadsListHandle::cv_internal_thread_to_JavaThread()`
call in fastdebug or slowdebug bits by default. The `-XX:+EnableThreadSMRExtraValidityChecks` option
can enable the check in release bits and the `-XX:-EnableThreadSMRExtraValidityChecks` option can
disable the check in fastdebug or slowdebug bits.

fastdebug or slowdebug bits will now fail an `assert()` if the `java_thread` is NOT found on the
ThreadsList (which should never happen).

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

Commit messages:
 - 8305670: Performance regression in LockSupport.unpark with lots of idle threads

Changes: https://git.openjdk.org/jdk/pull/13393/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13393&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8305670
  Stats: 16 lines in 2 files changed: 11 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/13393.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13393/head:pull/13393

PR: https://git.openjdk.org/jdk/pull/13393


More information about the hotspot-runtime-dev mailing list