< 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,23 +56,21 @@
return;
}
ExceptionEventsCount++;
- if (!NSK_JNI_VERIFY(jni_env, (klass =
- NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) {
+ if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env,
- klass, &signature, NULL))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(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);
+ jvmti_env->Deallocate((unsigned char*)signature);
}
void JNICALL
ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread,
jmethodID method, jlocation location, jobject exception) {
@@ -83,23 +81,21 @@
return;
}
ExceptionCatchEventsCount++;
- if (!NSK_JNI_VERIFY(jni_env, (klass =
- NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) {
+ if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env,
- klass, &signature, NULL))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(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);
+ jvmti_env->Deallocate((unsigned char*)signature);
}
/* ========================================================================== */
/** Agent algorithm. */
@@ -107,28 +103,24 @@
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)))
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(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)))
+ 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(NSK_CPP_STUB4(SetEventNotificationMode,
- jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL)))
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(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)))
+ 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,11 +168,11 @@
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))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
return JNI_ERR;
}
memset(&callbacks, 0, sizeof(callbacks));
callbacks.Exception = &Exception;
< prev index next >