< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThread/suspendthrd001/suspendthrd001.cpp
Print this page
rev 52185 : 8212148: Remove remaining NSK_CPP_STUBs
Summary: Remove remaining macros
Reviewed-by: amenkov, phh
*** 56,67 ****
nsk_jvmti_threadByName(THREAD_NAME)) != NULL))
return;
NSK_DISPLAY1(" ... found thread: %p\n", (void*)testedThread);
NSK_DISPLAY1("Suspend thread: %p\n", (void*)testedThread);
! if (!NSK_JVMTI_VERIFY(
! NSK_CPP_STUB2(SuspendThread, jvmti, testedThread))) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY0("Let thread to run and finish\n");
--- 56,66 ----
nsk_jvmti_threadByName(THREAD_NAME)) != NULL))
return;
NSK_DISPLAY1(" ... found thread: %p\n", (void*)testedThread);
NSK_DISPLAY1("Suspend thread: %p\n", (void*)testedThread);
! if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(testedThread))) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY0("Let thread to run and finish\n");
*** 70,81 ****
NSK_DISPLAY1("Get state vector for thread: %p\n", (void*)testedThread);
{
jint state = 0;
! if (!NSK_JVMTI_VERIFY(
! NSK_CPP_STUB3(GetThreadState, jvmti, testedThread, &state))) {
nsk_jvmti_setFailStatus();
}
NSK_DISPLAY2(" ... got state vector: %s (%d)\n",
TranslateState(state), (int)state);
--- 69,79 ----
NSK_DISPLAY1("Get state vector for thread: %p\n", (void*)testedThread);
{
jint state = 0;
! if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(testedThread, &state))) {
nsk_jvmti_setFailStatus();
}
NSK_DISPLAY2(" ... got state vector: %s (%d)\n",
TranslateState(state), (int)state);
*** 86,106 ****
nsk_jvmti_setFailStatus();
}
}
NSK_DISPLAY1("Resume thread: %p\n", (void*)testedThread);
! if (!NSK_JVMTI_VERIFY(
! NSK_CPP_STUB2(ResumeThread, jvmti, testedThread))) {
nsk_jvmti_setFailStatus();
}
NSK_DISPLAY0("Wait for thread to finish\n");
if (!nsk_jvmti_waitForSync(timeout))
return;
NSK_DISPLAY0("Delete thread reference\n");
! NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread));
}
NSK_DISPLAY0("Let debugee to finish\n");
if (!nsk_jvmti_resumeSync())
return;
--- 84,103 ----
nsk_jvmti_setFailStatus();
}
}
NSK_DISPLAY1("Resume thread: %p\n", (void*)testedThread);
! if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(testedThread))) {
nsk_jvmti_setFailStatus();
}
NSK_DISPLAY0("Wait for thread to finish\n");
if (!nsk_jvmti_waitForSync(timeout))
return;
NSK_DISPLAY0("Delete thread reference\n");
! NSK_TRACE(jni->DeleteGlobalRef(testedThread));
}
NSK_DISPLAY0("Let debugee to finish\n");
if (!nsk_jvmti_resumeSync())
return;
*** 137,148 ****
/* add specific capabilities for suspending thread */
{
jvmtiCapabilities suspendCaps;
memset(&suspendCaps, 0, sizeof(suspendCaps));
suspendCaps.can_suspend = 1;
! if (!NSK_JVMTI_VERIFY(
! NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps)))
return JNI_ERR;
}
/* register agent proc and arg */
if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
--- 134,144 ----
/* add specific capabilities for suspending thread */
{
jvmtiCapabilities suspendCaps;
memset(&suspendCaps, 0, sizeof(suspendCaps));
suspendCaps.can_suspend = 1;
! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps)))
return JNI_ERR;
}
/* register agent proc and arg */
if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
< prev index next >