-
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 jvmtiGetOrSetLocal and jvmtiNotifyFramePop to support virtual threads #15857
Conversation
currently the serviceability/jvmti/GetLocalVariable/GetLocalVars fails with the following output:
|
@fengxue-IS @babsingh FYI |
d84ea07
to
9b15ac8
Compare
See the top commit in https://github.com/babsingh/openj9/commits/loom_jvmti_8. It has the revised version of the changes in this PR. JVMTI The following virtual thread tests successfully passed for my commit:
Note: Testing had to be run with |
re #15857 (comment): Test in question:
The above test is not specific to virtual threads. It has been around since 2018. Even without the changes in this PR, the failure reported in #15857 (comment) will be seen. Currently, this failure is outside the scope of the work to support virtual threads in JVMTI functions. @thallium Please verify that this test fails without the changes in this PR, and then open a Github issue to document the failure. This failure will be addressed in the future. |
@tajila As per #15857 (comment), I will end up being a co-author in this PR. So, I won't be able to merge this PR. Also, the changes in this PR are very similar to the changes in #15914 in terms of functionality. So, the same reviewer can review both PRs. Note: There will be merge conflicts between #15857 and #15914 due to some overlap of code. |
9b15ac8
to
5074bbe
Compare
5074bbe
to
bbfd9d4
Compare
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.
will crash for JDK18 and before. suggested ifdefs and minor formatting nitpicks.
bbfd9d4
to
cf64a15
Compare
Support for virtual threads added in the following JVMTI functions: - GetOwnedMonitorInfo - GetOwnedMonitorStackDepthInfo - GetCurrentContendedMonitor Related changes: eclipse-openj9#15857 GetThreadState and GetThreadInfo allow a NULL input thread. In such a case, they should look at the current thread's object. Because using the NULL input thread causes a seg fault. This has been fixed. Related issue: eclipse-openj9#15759 Co-authored-by: Gengchen Tuo <gengchen.tuo@ibm.com> Co-authored-by: Jack Lu <Jack.S.Lu@ibm.com> Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Support for virtual threads added in the following JVMTI functions: - GetOwnedMonitorInfo - GetOwnedMonitorStackDepthInfo - GetCurrentContendedMonitor Related changes: eclipse-openj9#15857 GetThreadState and GetThreadInfo allow a NULL input thread. In such a case, they should look at the current thread's object. Because using the NULL input thread causes a seg fault. This has been fixed. Related issue: eclipse-openj9#15759 Co-authored-by: Gengchen Tuo <gengchen.tuo@ibm.com> Co-authored-by: Jack Lu <Jack.S.Lu@ibm.com> Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
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.
#15914 was merged. Please resolve the merge conflicts and the last minor grammar nitpick. Then, I will launch the PR builds.
Adds virtual thread support for GetOrSetLocal and NotifyFramePop As walkState->walkThread will be used by some jit functions after stackwalk, we can't use walkContinuationStackFrames which will cause dangling pointer. Instead we need to stack-allocate manually if a J9VMContinuation needs to be walked, so we created a helper getJ9VMContinuationToWalk to get the J9VMContinuation. Also fix coding style of surrounding code Issues: eclipse-openj9#15759 eclipse-openj9#15183 Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com> Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
cf64a15
to
06d73f9
Compare
jenkins test sanity win,xlinux jdk19 |
jenkins test sanity win,amac jdk11 |
Adds virtual thread support for GetOrSetLocal and NotifyFramePop
As walkState->walkThread will be used by some jit functions after
stackwalk, we can't use walkContinuationStackFrames which will cause
dangling pointer. Instead we need to stack-allocate manually if a
J9VMContinuation needs to be walked, so we created a helper
getJ9VMContinuationToWalk to get the J9VMContinuation.
Also fix coding style of surrounding code
Issues: #15759 #15183
Co-authored-by: Babneet Singh sbabneet@ca.ibm.com
Signed-off-by: Gengchen Tuo gengchen.tuo@ibm.com