-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK21 requires JVM_VirtualThreadMount/JVM_VirtualThreadUnmount implementations #16984
Comments
jdk21 also removes the need for these functions:
|
From a functional perspective, the new functions are amalgamated forms of the old functions:
To avoid hindering the JDK19 release, this change should be applied on top of #16855.
This field has been moved to native. It is enabled from JNI GetEnv if Continuations are enabled. |
@thallium can you take a look at this |
Updated the PR as per #16984 (comment) required by ibmruntimes/openj9-openjdk-jdk#572 |
These exports are not needed by JDK21+. |
More changes coming from upstream, see meaning the signature of two existing functions change and two new ones are introduced. |
re #16984 (comment): @keithc-ca Looking for a timeline to support the new changes. Are the new changes JDK21 specific or will they flow down to JDK20? |
I've only seen those changes in JDK21; I don't know whether those changes will get back-ported to JDK20. |
There are some changes in the jdk20u master branch. We won't integrate anything until there is a 20.0.2 build tag. No guarantee these changes will go in to 20.0.2 or that we'll integrate anything until July 18. |
I don't see 8306028: separate ThreadStart/ThreadEnd events posting code in JVMTI VTMS transitions in openjdk/jdk20u@jdk-20.0.1+9...master. For the time being, I will assume that the new changes are JDK21-specific. |
8306028: separate ThreadStart/ThreadEnd events posting code in JVMTI VTMS transitions Rough draft of the OpenJ9 changes to support the above upstream changes:
|
Is there any ETA on when this will be integrated into the extension-repo build branch? if we are expecting this to be done within this week, we should include the changes in #17125 rather than refactoring it shortly after merging. |
- Move code of APIs of JDK 20 such as JVM_VirtualThreadMountBegin to helpers so they can be called by APIs of both JDK 20 and 21 - Hide frames between mount/unmount begin and mount/unmount end Fixes eclipse-openj9#16984 Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
The branch |
- Move code of APIs of JDK 20 such as JVM_VirtualThreadMountBegin to helpers so they can be called by APIs of both JDK 20 and 21 - Hide frames between mount/unmount begin and mount/unmount end Fixes eclipse-openj9#16984 Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
- Move code of APIs of JDK 20 such as JVM_VirtualThreadMountBegin to helpers so they can be called by APIs of both JDK 20 and 21 - Hide frames between mount/unmount begin and mount/unmount end Fixes eclipse-openj9#16984 Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
In the signature of these functions changed
and these functions are added
|
A change to bring up latest Java 21 level including these two APIs is in progress. |
#17125 has support for the new changes mentioned in #16984 (comment). The PR title and description needs to be updated but it includes all the four functions: JVM_VirtualThread Mount, Unmount, Start and End. |
- Move code of APIs of JDK 20 such as JVM_VirtualThreadMountBegin to helpers so they can be called by APIs of both JDK 20 and 21 - Hide frames between mount/unmount begin and mount/unmount end - Seperate out code that is specific to first mount and last unmount. Fixes eclipse-openj9#16984 Outlines of related functions: virtualThread[Mount|Unmount]Begin: enterVThreadTransition() virtualThreadHideFrames(true) virtualThread[Mount|Unmount]End: virtualThreadHideFrames(false) exitVThreadTransition() JVM_VirtualThreadMount(bool hide): if (hide) virtualThreadMountBegin() else virtualThreadMountEnd() TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_MOUNT() JVM_VirtualThreadUnmount(bool hide): if (hide) TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_UNMOUNT() virtualThreadUnmountBegin() else virtualThreadUnmountEnd() JVM_VirtualThreadStart() virtualThreadMountEnd() TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_STARTED() JVM_VirtualThreadEnd() TRIGGER_J9HOOK_VM_VIRTUAL_THREAD_END() virtualThreadUnmountBegin() Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics added two new JVM methods. [1]
In addition, it removed
notifyJvmtiEvents
which made the JCL patch Enable VirtualThread JVMTI natives by default redundant.FYI @fengxue-IS @babsingh @tajila
[1] https://github.com/ibmruntimes/openj9-openjdk-jdk/blob/1e70d47e951486673ca369046dadc498ccba4a43/src/hotspot/share/include/jvm.h#L1143-L1150
The text was updated successfully, but these errors were encountered: