-
Notifications
You must be signed in to change notification settings - Fork 706
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
Update getVirtualThreadState to handle all mounted scenarios #15968
Conversation
A mounted virtual thread is associated to a valid J9VMThread. For virtual threads, targetThread is non-null for PARKING and YIELDING states. getVirtualThreadState has been updated to use carrier thread's state whenever targetThread is non-null for a virtual thread. This correctly returns the JVMTI_THREAD_STATE_SUSPENDED flag for virtual threads. Related: eclipse-openj9#15762 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
All four tests in the following test suite pass: https://github.com/ibmruntimes/openj9-openjdk-jdk19/tree/openj9/test/hotspot/jtreg/serviceability/jvmti/thread/GetThreadState. |
getVirtualThreadState is called from two locations, which verify that the input thread parameter is a virtual thread instance. |
@hangshao0 Can you please review the PR? View the changes with whitespace hidden. |
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.
LGTM.
@pshipton Can you please review/merge these changes? |
jenkins test sanity,extended alinux64 jdk8,jdk19 |
In the above build, the below failure is seen 6 times:
This PR contains changes which are ifdef'ed between |
I expect the jdk8 failures are a mismatch between having a new test and not having the corresponding OpenJ9 JCL changes. Related to #15979 |
A mounted virtual thread is associated to a valid J9VMThread.
For virtual threads, targetThread is non-null for PARKING and YIELDING
states. getVirtualThreadState has been updated to use carrier thread's
state whenever targetThread is non-null for a virtual thread. This
correctly returns the JVMTI_THREAD_STATE_SUSPENDED flag for virtual
threads.
Related: #15762
Signed-off-by: Babneet Singh sbabneet@ca.ibm.com