Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#15914 from babsingh/loom_jvmti_9
Browse files Browse the repository at this point in the history
Loom: Update JVMTI monitor functions
  • Loading branch information
gacholio authored Sep 22, 2022
2 parents abdbf1d + 11a4de7 commit 5a2eb17
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 107 deletions.
21 changes: 21 additions & 0 deletions runtime/jvmti/jvmtiHelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1929,3 +1929,24 @@ genericWalkStackFramesHelper(J9VMThread *currentThread, J9VMThread *targetThread

return rc;
}

#if JAVA_SPEC_VERSION >= 19
J9VMContinuation *
getJ9VMContinuationToWalk(J9VMThread *currentThread, J9VMThread *targetThread, j9object_t threadObject)
{
J9VMContinuation *continuation = NULL;
if (IS_VIRTUAL_THREAD(currentThread, threadObject)) {
if (NULL == targetThread) {
/* An unmounted virtual thread will have a valid J9VMContinuation. */
j9object_t contObject = (j9object_t)J9VMJAVALANGVIRTUALTHREAD_CONT(currentThread, threadObject);
continuation = J9VMJDKINTERNALVMCONTINUATION_VMREF(currentThread, contObject);
}
} else {
/* J9VMThread->currentContinuation is set to NULL if a virtual thread is not mounted.
* If a virtual thread is mounted, currentContinuation stores the carrier thread details.
*/
continuation = targetThread->currentContinuation;
}
return continuation;
}
#endif /* JAVA_SPEC_VERSION >= 19 */
Loading

0 comments on commit 5a2eb17

Please sign in to comment.