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:
Serguei Spitsyn 2019-06-28 16:06:44 -07:00
parent 9d6c7764b6
commit ff1f2fad6e

View File

@ -119,19 +119,10 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) {
/* check if event is for tested object */
if (jni->IsSameObject(object_M, obj)) {
jvmtiMonitorUsage usageInfo;
if (lockSyncLock(jvmti)) {
enterEventsCount++;
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();
}
}
}