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

Aleksey Shipilev shade at openjdk.org
Mon Apr 22 09:39:32 UTC 2024


On Thu, 18 Apr 2024 17:23:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> 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

@jerboaa, @GoeLin -- good for 21u, or?

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/328#issuecomment-2068938137


More information about the jdk-updates-dev mailing list