8226917: jvmti/scenarios/contention/TC04/tc04t001/TestDescription.java fails on jvmti->InterruptThread (JVMTI_ERROR_THREAD_NOT_ALIVE)
Fix one more sync issue in the test Reviewed-by: dcubed, gadams, amenkov
This commit is contained in:
parent
9d6c7764b6
commit
ff1f2fad6e
@ -119,19 +119,10 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) {
|
|||||||
|
|
||||||
/* check if event is for tested object */
|
/* check if event is for tested object */
|
||||||
if (jni->IsSameObject(object_M, obj)) {
|
if (jni->IsSameObject(object_M, obj)) {
|
||||||
jvmtiMonitorUsage usageInfo;
|
|
||||||
|
|
||||||
if (lockSyncLock(jvmti)) {
|
if (lockSyncLock(jvmti)) {
|
||||||
enterEventsCount++;
|
enterEventsCount++;
|
||||||
unlockSyncLock(jvmti);
|
unlockSyncLock(jvmti);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(obj, &usageInfo))) {
|
|
||||||
nsk_jvmti_setFailStatus();
|
|
||||||
} else if (usageInfo.owner != NULL) {
|
|
||||||
if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(usageInfo.owner)))
|
|
||||||
nsk_jvmti_setFailStatus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user