-
Notifications
You must be signed in to change notification settings - Fork 721
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
Implement JVM_VirtualThread[Mount|Unmount|Start|End] #17125
Conversation
@fengxue-IS FYI |
084d53d
to
0f06919
Compare
0f06919
to
7e7ad8c
Compare
@fengxue-IS can you take a look? |
715e437
to
0c41d0e
Compare
@fengxue-IS Your comments have been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fengxue-IS @thallium
|
@dipak-bagadiya Just want to confirm is this my latest change? I've moved the assertion so it won't be checked during mount/unmount. |
0c41d0e
to
22bc7f5
Compare
@thallium will check with latest commit. |
22bc7f5
to
5f19b9e
Compare
6130215
to
c01be02
Compare
c01be02
to
6f17ac4
Compare
6f17ac4
to
4524403
Compare
9cf16e0
to
8267927
Compare
I merged this into #17514 and ran a small test program that used virtual threads:
Here's an excerpt of the native stack:
Apparently, running under the debugger is significant; the program runs fine otherwise. |
8605740
to
e075bdc
Compare
@keithc-ca The assertion failure should be fixed now by moving acquiring VM access from helpers to |
e075bdc
to
6497056
Compare
6497056
to
36d75c4
Compare
36d75c4
to
fa696cf
Compare
- 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>
fa696cf
to
ef5bb83
Compare
@keithc-ca Your comments have been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't make any more changes to this; #17514 needs to be rebased upon this so ibmruntimes/openj9-openjdk-jdk#608 and an equivalent change for https://github.com/ibmruntimes/openj9-openjdk-jdk21 can all be merged together.
Any further comments, @babsingh or @fengxue-IS? Builds in ibmruntimes/openj9-openjdk-jdk#608 have passed and I expect a similar result in ibmruntimes/openj9-openjdk-jdk21#5 after which I am ready to merge #17514 (which includes this) together with ibmruntimes/openj9-openjdk-jdk#608 and ibmruntimes/openj9-openjdk-jdk21#5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any further comments, @babsingh or @fengxue-IS?
No. LGTM.
Merged via #17514. |
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was embedded in eclipse-openj9/openj9#17514 and merged. Now, the MethodExitTest failure is being tracked through eclipse-openj9/openj9#17514. Closes eclipse-openj9/openj9#16346 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was embedded in eclipse-openj9/openj9#17514 and merged. Now, the MethodExitTest failure is being tracked through eclipse-openj9/openj9#17490. Closes eclipse-openj9/openj9#16346 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was embedded in eclipse-openj9/openj9#17514 and merged. Now, the MethodExitTest failure is being tracked through eclipse-openj9/openj9#17490. Closes eclipse-openj9/openj9#16346 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
to helpers so they can be called by APIs of both JDK 20 and 21
Fixes #16984