Skip to content
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

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

babsingh
Copy link
Contributor

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

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>
@babsingh
Copy link
Contributor Author

@babsingh
Copy link
Contributor Author

getVirtualThreadState is called from two locations, which verify that the input thread parameter is a virtual thread instance.

@babsingh
Copy link
Contributor Author

@hangshao0 Can you please review the PR? View the changes with whitespace hidden.

Copy link
Contributor

@hangshao0 hangshao0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@babsingh
Copy link
Contributor Author

@pshipton Can you please review/merge these changes?

@pshipton
Copy link
Member

jenkins test sanity,extended alinux64 jdk8,jdk19

@hangshao0 hangshao0 added the project:loom Used to track Project Loom related work label Sep 27, 2022
@babsingh
Copy link
Contributor Author

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_sanity.functional_aarch64_linux_Personal/80/tapResults/

In the above build, the below failure is seen 6 times:

FAILED: test_deleteCharAt
java.lang.AssertionError: Index >= buffer length should have failed
	at org.testng.AssertJUnit.fail(AssertJUnit.java:59) from sun.misc.Launcher$AppClassLoader@4b914c4f(file:/home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_aarch64_linux_Personal_testList_1/aqa-tests/TKG/lib/testng.jar)
	at org.openj9.test.java.lang.Test_StringBuffer.test_deleteCharAt(Test_StringBuffer.java:323) from sun.misc.Launcher$AppClassLoader@4b914c4f(file:/home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_aarch64_linux_Personal_testList_1/jvmtest/functional/Java8andUp/GeneralTest.jar)

This PR contains changes which are ifdef'ed between JAVA_SPEC_VERSION >= 19. So, the above JDK8 failure is unrelated to this PR.

@pshipton
Copy link
Member

pshipton commented Sep 28, 2022

I expect the jdk8 failures are a mismatch between having a new test and not having the corresponding OpenJ9 JCL changes. Related to #15979

@pshipton pshipton merged commit de05d03 into eclipse-openj9:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm project:loom Used to track Project Loom related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants