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

Support yield of pinned VirtualThread in VM code path #21064

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

fengxue-IS
Copy link
Contributor

add new code path to intercept enterObjectMonitor function in BytecodeInterpreter.

New helper to inflate all owned monitors and blocking object.
implement takeVirtualThreadListToUnblock API to generate list of virtual threads to unblock.

add check in Object.wait/notify to yield virtual thread if possible.

Related: #20942

@fengxue-IS fengxue-IS force-pushed the jep491-3 branch 5 times, most recently from ef07831 to 9333046 Compare February 4, 2025 17:31
@fengxue-IS fengxue-IS force-pushed the jep491-3 branch 5 times, most recently from 83775ac to 8ee76cb Compare February 4, 2025 19:35
Signed-off-by: Jack Lu <[email protected]>
@fengxue-IS
Copy link
Contributor Author

Updated monitor waiting list to native ref per discussion #20942 (comment), added vthread ref to J9VMContinuation so monitor will know which vthread to to notify.

@babsingh babsingh self-requested a review February 14, 2025 18:43
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.

1 participant