Skip to content

Commit

Permalink
Merge pull request #17316 from babsingh/fix_jvmtiGetCarrierThread
Browse files Browse the repository at this point in the history
[JDK20] Update jvmtiGetCarrierThread
  • Loading branch information
gacholio authored May 1, 2023
2 parents d4443d6 + fe3e5d4 commit 85db8ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/jvmti/jvmtiExtensionMechanism.c
Original file line number Diff line number Diff line change
Expand Up @@ -3807,9 +3807,7 @@ jvmtiGetVirtualThread(jvmtiEnv* jvmti_env, ...)
if (JVMTI_ERROR_NONE == rc) {
j9object_t threadObject = targetThread->threadObject;
j9object_t carrierThreadObject = targetThread->carrierThreadObject;
if ((NULL != threadObject)
&& (threadObject != carrierThreadObject)
) {
if ((NULL != threadObject) && (threadObject != carrierThreadObject)) {
rv_virtual_thread = (jthread)vm->internalVMFunctions->j9jni_createLocalRef(
(JNIEnv *)currentThread,
threadObject);
Expand Down Expand Up @@ -3869,12 +3867,14 @@ jvmtiGetCarrierThread(jvmtiEnv* jvmti_env, ...)

rc = getVMThread(
currentThread, virtual_thread, &targetThread, JVMTI_ERROR_NONE,
J9JVMTI_GETVMTHREAD_ERROR_ON_DEAD_THREAD | J9JVMTI_GETVMTHREAD_ERROR_ON_NULL_JTHREAD);
J9JVMTI_GETVMTHREAD_ERROR_ON_DEAD_THREAD);
if (JVMTI_ERROR_NONE == rc) {
if (NULL != targetThread->carrierThreadObject) {
j9object_t threadObject = targetThread->threadObject;
j9object_t carrierThreadObject = targetThread->carrierThreadObject;
if ((NULL != carrierThreadObject) && (threadObject != carrierThreadObject)) {
rv_carrier_thread = (jthread)vm->internalVMFunctions->j9jni_createLocalRef(
(JNIEnv *)currentThread,
(j9object_t)targetThread->carrierThreadObject);
carrierThreadObject);
}
releaseVMThread(currentThread, targetThread, virtual_thread);
}
Expand Down

0 comments on commit 85db8ab

Please sign in to comment.