< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t001/sp01t001.cpp

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

@@ -119,41 +119,39 @@
     jobjectArray threadsArray = NULL;
     jsize threadsArrayLength = 0;
     jsize i;
 
     /* find debugee class */
-    if (!NSK_JNI_VERIFY(jni, (debugeeClass =
-            NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     /* find static field with threads array */
     if (!NSK_JNI_VERIFY(jni, (threadsFieldID =
-            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
-                                    THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL))
+            jni->GetStaticFieldID(debugeeClass, THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL))
         return NSK_FALSE;
 
     /* get threads array from static field */
     if (!NSK_JNI_VERIFY(jni, (threadsArray = (jobjectArray)
-            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, threadsFieldID)) != NULL))
+            jni->GetStaticObjectField(debugeeClass, threadsFieldID)) != NULL))
         return NSK_FALSE;
 
     /* check array length */
     if (!NSK_JNI_VERIFY(jni, (threadsArrayLength =
-            NSK_CPP_STUB2(GetArrayLength, jni, threadsArray)) == THREADS_COUNT))
+            jni->GetArrayLength(threadsArray)) == THREADS_COUNT))
         return NSK_FALSE;
 
     /* get each thread from array */
     for (i = 0; i < THREADS_COUNT; i++) {
         if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread)
-                NSK_CPP_STUB3(GetObjectArrayElement, jni, threadsArray, i)) != NULL))
+                jni->GetObjectArrayElement(threadsArray, i)) != NULL))
             return NSK_FALSE;
     }
 
     /* make global references to threads */
     for (i = 0; i < THREADS_COUNT; i++) {
         if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread)
-                NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL))
+                jni->NewGlobalRef(threadsList[i])) != NULL))
             return NSK_FALSE;
     }
 
     return NSK_TRUE;
 }

@@ -172,12 +170,11 @@
         jint state = JVMTI_THREAD_STATE_NOT_STARTED;
 
         NSK_DISPLAY2("    thread #%d (%s):\n", i, threadsName[i]);
 
         /* get thread state */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i], &state))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i], &state))) {
             nsk_jvmti_setFailStatus();
             return NSK_TRUE;
         }
 
         /* display thread state */

@@ -231,11 +228,11 @@
 static int clean() {
     int i;
 
     /* dispose global references to threads */
     for (i = 0; i < THREADS_COUNT; i++) {
-        NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i]));
+        NSK_TRACE(jni->DeleteGlobalRef(threadsList[i]));
     }
 
     return NSK_TRUE;
 }
 
< prev index next >