< prev index next >

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

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

*** 153,164 **** for (i = 0; i < THREADS_COUNT; i++) { threadsList[i] = NULL; } /* get all live threads */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) return NSK_FALSE; --- 153,163 ---- for (i = 0; i < THREADS_COUNT; i++) { threadsList[i] = NULL; } /* get all live threads */ ! if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) return NSK_FALSE;
*** 168,179 **** if (!NSK_VERIFY(allThreadsList[i] != NULL)) return NSK_FALSE; /* get thread name (info) */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ if (threadInfo.name != NULL) { int j; --- 167,177 ---- if (!NSK_VERIFY(allThreadsList[i] != NULL)) return NSK_FALSE; /* get thread name (info) */ ! if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ if (threadInfo.name != NULL) { int j;
*** 187,198 **** } } } /* deallocate all threads list */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ found = 0; for (i = 0; i < THREADS_COUNT; i++) { --- 185,195 ---- } } } /* deallocate all threads list */ ! if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ found = 0; for (i = 0; i < THREADS_COUNT; i++) {
*** 206,217 **** if (found < THREADS_COUNT) return NSK_FALSE; /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { ! if (!NSK_JNI_VERIFY(jni, (threadsList[i] = ! NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) return NSK_FALSE; } return NSK_TRUE; } --- 203,213 ---- if (found < THREADS_COUNT) return NSK_FALSE; /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { ! if (!NSK_JNI_VERIFY(jni, (threadsList[i] = jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } return NSK_TRUE; }
*** 224,241 **** const char* kind = (suspend ? "suspending" : "resuming"); int i; /* suspend or resume threads list */ if (suspend) { ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB4(SuspendThreadList, jvmti, THREADS_COUNT, ! threadsList, results))) nsk_jvmti_setFailStatus(); } else { ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB4(ResumeThreadList, jvmti, THREADS_COUNT, ! threadsList, results))) nsk_jvmti_setFailStatus(); } /* check results */ for (i = 0; i < THREADS_COUNT; i++) { --- 220,233 ---- const char* kind = (suspend ? "suspending" : "resuming"); int i; /* suspend or resume threads list */ if (suspend) { ! if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(THREADS_COUNT, threadsList, results))) nsk_jvmti_setFailStatus(); } else { ! if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(THREADS_COUNT, threadsList, results))) nsk_jvmti_setFailStatus(); } /* check results */ for (i = 0; i < THREADS_COUNT; i++) {
*** 271,282 **** NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsName[i]); /* wait for WAITTIME for thread to reach expected state */ do { /* get thread status */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i], &state))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } /* break if state is NOT_STARTED as expected */ --- 263,273 ---- NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsName[i]); /* wait for WAITTIME for thread to reach expected state */ do { /* get thread status */ ! if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i], &state))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } /* break if state is NOT_STARTED as expected */
*** 382,392 **** 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])); } return NSK_TRUE; } --- 373,383 ---- static int clean() { int i; /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { ! NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; }
*** 460,471 **** /* 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))) return JNI_ERR; } /* register agent proc and arg */ if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) --- 451,461 ---- /* add specific capabilities for suspending thread */ { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; ! 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 >