< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThread/suspendthrd001/suspendthrd001.cpp

Print this page
rev 52185 : [mq]: refactor

@@ -56,12 +56,11 @@
                 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))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(testedThread))) {
             nsk_jvmti_setFailStatus();
             return;
         }
 
         NSK_DISPLAY0("Let thread to run and finish\n");

@@ -70,12 +69,11 @@
 
         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))) {
+            if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(testedThread, &state))) {
                 nsk_jvmti_setFailStatus();
             }
             NSK_DISPLAY2("  ... got state vector: %s (%d)\n",
                             TranslateState(state), (int)state);
 

@@ -86,21 +84,20 @@
                 nsk_jvmti_setFailStatus();
             }
         }
 
         NSK_DISPLAY1("Resume thread: %p\n", (void*)testedThread);
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB2(ResumeThread, jvmti, 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(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread));
+        NSK_TRACE(jni->DeleteGlobalRef(testedThread));
     }
 
     NSK_DISPLAY0("Let debugee to finish\n");
     if (!nsk_jvmti_resumeSync())
         return;

@@ -137,12 +134,11 @@
     /* 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)))
+        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 >