< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001.cpp

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

*** 56,78 **** return; } ExceptionEventsCount++; ! if (!NSK_JNI_VERIFY(jni_env, (klass = ! NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, ! klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Exception event: %s\n", signature); if (signature != NULL) ! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); } void JNICALL ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jmethodID method, jlocation location, jobject exception) { --- 56,76 ---- return; } ExceptionEventsCount++; ! if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } ! if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Exception event: %s\n", signature); if (signature != NULL) ! jvmti_env->Deallocate((unsigned char*)signature); } void JNICALL ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jmethodID method, jlocation location, jobject exception) {
*** 83,105 **** return; } ExceptionCatchEventsCount++; ! if (!NSK_JNI_VERIFY(jni_env, (klass = ! NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, ! klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("ExceptionCatch event: %s\n", signature); if (signature != NULL) ! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); } /* ========================================================================== */ /** Agent algorithm. */ --- 81,101 ---- return; } ExceptionCatchEventsCount++; ! if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } ! if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("ExceptionCatch event: %s\n", signature); if (signature != NULL) ! jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ /** Agent algorithm. */
*** 107,134 **** agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ if (!nsk_jvmti_resumeSync()) return; if (!nsk_jvmti_waitForSync(timeout)) return; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Exception events received: %d\n", ExceptionEventsCount); if (!NSK_VERIFY(ExceptionEventsCount == 3)) --- 103,126 ---- agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ if (!nsk_jvmti_resumeSync()) return; if (!nsk_jvmti_waitForSync(timeout)) return; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Exception events received: %d\n", ExceptionEventsCount); if (!NSK_VERIFY(ExceptionEventsCount == 3))
*** 176,186 **** if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) return JNI_ERR; memset(&caps, 0, sizeof(caps)); caps.can_generate_exception_events = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { return JNI_ERR; } memset(&callbacks, 0, sizeof(callbacks)); callbacks.Exception = &Exception; --- 168,178 ---- if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) return JNI_ERR; memset(&caps, 0, sizeof(caps)); caps.can_generate_exception_events = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&callbacks, 0, sizeof(callbacks)); callbacks.Exception = &Exception;
< prev index next >