[jdk21u-dev] RFR: 8320707: Virtual thread test updates [v2]

Aleksey Shipilev shade at openjdk.org
Thu Apr 18 17:23:23 UTC 2024


> Test-only backport that simplifies Loom maintenance. The original commit applies cleanly, but it does not work out of the box, because `VThreadPinner` uses FFM, which is a preview feature in JDK 21, made final in JDK 22. My attempts to soft-touch FFM into working in JDK 21 with these tests failed: x86_32's fallback linker does not work properly in JDK 21, so tests cannot complete there.
> 
> Therefore, I made a side-ways move here: rewrote `VThreadPinner` to use `synchronized`, which still pins the thread in JDK 21, and would likely continue doing so. It is unlikely we would backport the runtime changes required to avoid pinning on synchronized blocks. This is what the old tests did anyway.
> 
> This would also make subsequent backports clean.
> 
> Additional testing:
>  - [x] MacOS AArch64 server fastdebug, `jdk_loom hotspot_loom`

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Rewrite VThreadPinner to use synchronized instead of (unstable) FFM
 - Backport b67b71cd87c62f15d5b73f923c300d0f77c988f5

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

Changes:
  - all: https://git.openjdk.org/jdk21u-dev/pull/328/files
  - new: https://git.openjdk.org/jdk21u-dev/pull/328/files/fc6dd1fa..17752923

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=328&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=328&range=00-01

  Stats: 25891 lines in 670 files changed: 13225 ins; 7118 del; 5548 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/328.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/328/head:pull/328

PR: https://git.openjdk.org/jdk21u-dev/pull/328


More information about the jdk-updates-dev mailing list