-
Notifications
You must be signed in to change notification settings - Fork 738
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
base: master
Are you sure you want to change the base?
Conversation
8ee76cb
to
c982de9
Compare
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. |
172fcc7
to
2859911
Compare
The remaining TODOs that are planned to be completed by EOD:
|
c5c8769
to
848f757
Compare
@fengxue-IS Can you squash your commits? My code review changes are in the top commit at https://github.com/babsingh/openj9/commits/jep491-3. If you have any questions about the code review changes, let's set up a call to resolve them quickly. Otherwise, please apply the code review changes while squashing the commits. I was only able to successfully compile after applying the code review changes, so please run some local tests on your end afterward. |
@babsingh changes have been squashed and updated following the review suggestions |
jenkins test sanity.functional,sanity.openjdk amac jdk21 |
jenkins test sanity.functional,sanity.openjdk alinux jdk24 |
@fengxue-IS Not all code is properly ifdef'ed for JDK24:
|
jenkins test sanity.functional,sanity.openjdk amac jdk21 |
jenkins test sanity.functional,sanity.openjdk zlinux jdk24 |
jenkins compile win jdk21,jdk24 |
JDK21 compilation still fails:
|
@fengxue-IS Can you compile locally or in a personal build to make sure all compilation failures are resolved before the next push? |
I have terminated the JDK21 Windows compile build since it will fail. JDK24 builds might pass; allowed them to continue running. |
Update Continuation.Pinned enum Add field refs in vmconstantpool.xml add helper to update monitor info add enterObjectMonitor intercept Add support for Object.wait() add support for object.notify() Add reverse link between J9VMContinuation and vthread & remove Object ref in J9ObjectMonitor Signed-off-by: Jack Lu <[email protected]>
Add helper function to reduce duplicate code Signed-off-by: Jack Lu <[email protected]>
Signed-off-by: Jack Lu <[email protected]>
running build locally to verify jdk21 isn't impacted by this change |
@babsingh confirmed locally JDK21 compile passed. |
jenkins test sanity.functional,sanity.openjdk amac jdk21 |
jenkins test sanity.functional,sanity.openjdk zlinux jdk24 |
jenkins compile win jdk21,jdk24 |
looking into the Skynet failure on mac for JDK21, so far haven't been able to reproduce on xlinux, will try on amac |
For the failures, there are core files in the PR builds:
@fengxue-IS Did you take a look at the core files? The segfault occurs in |
Correct monitorRecords pool allocation Release VMAccess when waiting for unblocked virtual threads Move JVM_TakeVirtualThreadListToUnblock code into helper Rename XX:YieldPinnedContinuation to XX:YieldPinnedVirtualThreads Co-authored-by: Jack Lu <[email protected]> Co-authored-by: Babneet Singh <[email protected]> Signed-off-by: Jack Lu <[email protected]>
Corrected the bug which is causing the crash on Mac, personal build to verify changes in progress issue is caused by access to recycled J9VMContinuation struct, moved the access code under check to ensure the J9VMContinuation pointer is always valid |
@babsingh grinder passed, can you restart the PR build |
jenkins test sanity.openjdk amac jdk21 |
jenkins test sanity.openjdk zlinux jdk24 |
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.
Adds new
-XX:[+|-]YieldPinnedVirtualThreads
optionRelated: #20942