Integrated: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics
Serguei Spitsyn
sspitsyn at openjdk.org
Mon Mar 20 19:58:51 UTC 2023
On Thu, 16 Mar 2023 05:03:51 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> This is needed for future performance/scalability improvements in JVMTI support of virtual threads.
> The update includes the following:
>
> 1. Refactored the `VirtualThread` native methods:
> `notifyJvmtiMountBegin` and `notifyJvmtiMountEnd` => `notifyJvmtiMount`
> `notifyJvmtiUnmountBegin` and `notifyJvmtiUnmountEnd` => `notifyJvmtiUnmount`
> 2. Still useful implementation of old native methods is moved from `jvm.cpp` to `jvmtiThreadState.cpp`:
> `JVM_VirtualThreadMountStart` => `VTMS_mount_begin`
> `JVM_VirtualThreadMountEnd` => `VTMS_mount_end`
> `JVM_VirtualThreadUnmountStart` = > `VTMS_unmount_begin`
> `JVM_VirtualThreadUnmountEnd` => `VTMS_mount_end`
> 3. Intrinsified the `VirtualThread` native methods: `notifyJvmtiMount`, `notifyJvmtiUnmount`, `notifyJvmtiHideFrames`.
> 4. Removed the`VirtualThread` static boolean state variable `notifyJvmtiEvents` and its support in `javaClasses`.
> 5. Added static boolean state variable `_VTMS_notify_jvmti_events` to the jvmtiVTMSTransitionDisabler class as a replacement of the `VirtualThread` `notifyJvmtiEvents` variable.
>
> Implementing the same methods as C1 intrinsics can be needed in the future but is a low priority for now.
>
> Testing:
> - Ran mach5 tiers 1-6. No regressions were found.
This pull request has now been integrated.
Changeset: bc0ed730
Author: Serguei Spitsyn <sspitsyn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/bc0ed730f2c9dad55d0046b4fe8c9cd623b6dbf8
Stats: 449 lines in 20 files changed: 276 ins; 125 del; 48 mod
8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics
Reviewed-by: vlivanov, lmesnik
-------------
PR: https://git.openjdk.org/jdk/pull/13054
More information about the serviceability-dev
mailing list