test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003/suspendthrd003.cpp
changeset 52215 0b0ba3a2fec9
parent 51774 79dc492c00ab
child 52949 c78a17d24618
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003/suspendthrd003.cpp	Mon Oct 22 09:26:50 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003/suspendthrd003.cpp	Mon Oct 22 12:43:15 2018 -0700
@@ -63,8 +63,7 @@
         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;
         }
@@ -78,8 +77,7 @@
         {
             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",
@@ -94,8 +92,7 @@
         }
 
         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();
         }
         /* Original agentProc test block ends here. */
@@ -107,7 +104,7 @@
         for (late_count = 0; late_count < N_LATE_CALLS; late_count++) {
             jvmtiError l_err;
             printf("INFO: Late suspend thread: %p\n", (void*)testedThread);
-            l_err = NSK_CPP_STUB2(SuspendThread, jvmti, testedThread);
+            l_err = jvmti->SuspendThread(testedThread);
             if (l_err != JVMTI_ERROR_NONE) {
                 printf("INFO: Late suspend thread err: %d\n", l_err);
                 // testedThread has exited so we're done with late calls
@@ -117,8 +114,7 @@
             // Only resume a thread if suspend worked. Using NSK_DISPLAY1()
             // here because we want ResumeThread() to be faster.
             NSK_DISPLAY1("INFO: Late 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();
             }
         }
@@ -137,7 +133,7 @@
             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");
@@ -180,8 +176,7 @@
         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;
     }