< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001.cpp

Print this page
rev 52100 : 8212082: Remove the NSK_CPP_STUB macros for remaining vmTestbase/jvmti/[sS]*
Summary:
Reviewed-by:

@@ -58,12 +58,11 @@
     int i;
 
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
         return NSK_FALSE;
 

@@ -71,12 +70,11 @@
     for (i = 0; i < threads_count; i++) {
         if (!NSK_VERIFY(threads[i] != NULL))
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
 
         /* find by name */

@@ -88,12 +86,11 @@
             }
         }
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     if (threadForStop == NULL) {
         NSK_COMPLAIN0("DebuggeeThreadForStop not found");
         return NSK_FALSE;

@@ -104,21 +101,18 @@
         return NSK_FALSE;
     }
 
     NSK_DISPLAY0("Prepare: create new instance of ThreadDeath exception\n");
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (threadDeath =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (threadDeath = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
 }
 

@@ -138,21 +132,19 @@
 
     NSK_DISPLAY0("Testcase #1: call StopThread\n");
     if (!NSK_VERIFY(threadForStop != NULL)) {
         nsk_jvmti_setFailStatus();
     } else {
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(StopThread, jvmti, threadForStop, threadDeath)))
+        if (!NSK_JVMTI_VERIFY(jvmti->StopThread(threadForStop, threadDeath)))
             nsk_jvmti_setFailStatus();
     }
 
     NSK_DISPLAY0("Testcase #2: call InterruptThread\n");
     if (!NSK_VERIFY(threadForInterrupt != NULL)) {
         nsk_jvmti_setFailStatus();
     } else {
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB2(InterruptThread, jvmti, threadForInterrupt)))
+        if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(threadForInterrupt)))
             nsk_jvmti_setFailStatus();
     }
 
     /* resume debugee and wait for sync */
     if (!nsk_jvmti_resumeSync())

@@ -197,11 +189,11 @@
     if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
         return JNI_ERR;
 
     memset(&caps, 0, sizeof(caps));
     caps.can_signal_thread = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
         return JNI_ERR;
     }
 
     memset(&callbacks, 0, sizeof(callbacks));
     if (!NSK_VERIFY(nsk_jvmti_init_MA(&callbacks)))
< prev index next >