diff -r f48838bdcc31 -r 3b8994cb4481 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp Mon Oct 15 09:34:18 2018 +0800 +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp Sun Oct 14 19:07:34 2018 -0700 @@ -158,8 +158,7 @@ } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -173,8 +172,7 @@ return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -192,8 +190,7 @@ } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -214,12 +211,11 @@ for (i = 0; i < THREADS_COUNT; i++) { /* get thread class */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; /* get frame method */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): %p (%s)\n", @@ -231,10 +227,10 @@ /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -250,13 +246,11 @@ for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -285,9 +279,7 @@ NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -296,8 +288,7 @@ /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -357,8 +348,8 @@ /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -436,8 +427,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; }