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

Add JVMTI synchronization in JVM_VirtualThreadHideFrames #18453

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

babsingh
Copy link
Contributor

J9VMThread->threadObject can be modified between
JVM_VirtualThreadHideFrames's first invocation with hide=true and
second invocation with hide=false. Synchronization to prevent JVMTI
operations is acquired between these two invocations. This prevents
JVMTI functions to see an unstable J9VMThread->threadObject.

Related: #17865
Related: #17869
Related: #18370

@babsingh
Copy link
Contributor Author

@fengxue-IS @tajila Requesting your review.

This is the last PR to address #17865, #17869 and #18370.

runtime/j9vm/javanextvmi.cpp Outdated Show resolved Hide resolved
J9VMThread->threadObject can be modified between
JVM_VirtualThreadHideFrames's first invocation with hide=true and
second invocation with hide=false. Synchronization to prevent JVMTI
operations is acquired between these two invocations. This prevents
JVMTI functions to see an unstable J9VMThread->threadObject.

Related: eclipse-openj9#17865
Related: eclipse-openj9#17869
Related: eclipse-openj9#18370

Co-authored-by: Jack Lu <Jack.S.Lu@ibm.com>
Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
runtime/j9vm/javanextvmi.cpp Show resolved Hide resolved
runtime/j9vm/javanextvmi.cpp Show resolved Hide resolved
runtime/j9vm/javanextvmi.cpp Show resolved Hide resolved
Copy link
Contributor

@fengxue-IS fengxue-IS 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

jenkins test sanity,extended.openjdk zlinux jdk21

@babsingh
Copy link
Contributor Author

@tajila PR builds look good. Requesting your review.

@tajila tajila merged commit 6043860 into eclipse-openj9:master Nov 19, 2023
4 of 6 checks passed
@tajila
Copy link
Contributor

tajila commented Nov 20, 2023

@babsingh You'll need to triple deliver to 0.42 and 0.43

@babsingh
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants