--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp Wed Oct 10 11:20:21 2018 -0700
@@ -54,12 +54,12 @@
static void
changeCount(jvmtiEvent event) {
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
+ if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
nsk_jvmti_setFailStatus();
eventCount[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
+ if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
nsk_jvmti_setFailStatus();
}
@@ -92,9 +92,7 @@
char *generic;
jvmtiPhase phase;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB4(GetClassSignature, jvmti_env, klass,
- &className, &generic))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic))) {
nsk_jvmti_setFailStatus();
return;
}
@@ -107,7 +105,7 @@
className);
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
nsk_jvmti_setFailStatus();
}
@@ -125,13 +123,11 @@
nsk_jvmti_setFailStatus();
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
- jvmti_env, (unsigned char*)className))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
nsk_jvmti_setFailStatus();
}
if (generic != NULL)
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
- jvmti_env, (unsigned char*)generic))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
nsk_jvmti_setFailStatus();
}
}
@@ -145,15 +141,12 @@
jvmtiPhase phase;
- if (!NSK_JNI_VERIFY(jni_env, (classObject =
- NSK_CPP_STUB2(GetObjectClass, jni_env, thread)) != NULL)) {
+ if (!NSK_JNI_VERIFY(jni_env, (classObject = jni_env->GetObjectClass(thread)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB4(GetClassSignature, jvmti_env, classObject,
- &className, &generic))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(classObject, &className, &generic))) {
nsk_jvmti_setFailStatus();
return;
}
@@ -166,7 +159,7 @@
className);
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
nsk_jvmti_setFailStatus();
}
@@ -184,13 +177,11 @@
nsk_jvmti_setFailStatus();
}
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
- jvmti_env, (unsigned char*)className))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
nsk_jvmti_setFailStatus();
}
if (generic != NULL)
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
- jvmti_env, (unsigned char*)generic))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
nsk_jvmti_setFailStatus();
}
}
@@ -200,7 +191,7 @@
jvmtiPhase phase;
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
nsk_jvmti_setFailStatus();
}
@@ -221,7 +212,7 @@
jvmtiPhase phase;
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
nsk_jvmti_setFailStatus();
}
@@ -242,7 +233,7 @@
jvmtiPhase phase;
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
nsk_jvmti_setFailStatus();
}
@@ -257,8 +248,7 @@
currentPhase = JVMTI_PHASE_DEAD;
changeCount(JVMTI_EVENT_VM_DEATH);
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
+ if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
nsk_jvmti_setFailStatus();
}
@@ -294,9 +284,7 @@
static int
enableEvent(jvmtiEventMode enable, jvmtiEvent event) {
NSK_DISPLAY1("enabling %s\n", TranslateEvent(event));
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB4(SetEventNotificationMode, jvmti, enable,
- event, NULL))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(enable, event, NULL))) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
@@ -369,10 +357,7 @@
eventCallbacks.ThreadStart = cbThreadStart;
eventCallbacks.ThreadEnd = cbThreadEnd;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(SetEventCallbacks, jvmti,
- &eventCallbacks,
- sizeof(eventCallbacks))))
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
return NSK_FALSE;
return NSK_TRUE;
@@ -446,8 +431,7 @@
if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
return JNI_ERR;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
nsk_jvmti_setFailStatus();
return JNI_ERR;
}