< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t011/em02t011.cpp
Print this page
rev 52050 : [mq]: refactor
@@ -142,16 +142,16 @@
}
static void
changeCount(jvmtiEvent event, int *currentCounts) {
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
+ if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
nsk_jvmti_setFailStatus();
currentCounts[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();
}
/* ============================================================================= */
@@ -167,12 +167,11 @@
changeCount(JVMTI_EVENT_VM_DEATH, &newEventCount[0]);
showEventStatistics(STEP_NUMBER);
if (!checkEvents(STEP_NUMBER))
nsk_jvmti_setFailStatus();
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
+ if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
nsk_jvmti_setFailStatus();
}
void JNICALL
@@ -324,20 +323,17 @@
static int enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_BREAKPOINT)) {
if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
- NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
- JVMTI_ENABLE, event, NULL))) {
+ jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
return NSK_FALSE;
}
} else {
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
- JVMTI_ENABLE, event, NULL))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
return NSK_FALSE;
}
}
@@ -426,14 +422,11 @@
eventCallbacks.VMDeath = cbVMDeath;
break;
}
- 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;
}
@@ -449,21 +442,18 @@
if (!nsk_jvmti_waitForSync(timeout))
return;
- if (!NSK_JNI_VERIFY(agentJNI, (cls =
- NSK_CPP_STUB2(FindClass, agentJNI, CLASS_NAME)) != NULL))
+ if (!NSK_JNI_VERIFY(agentJNI, (cls = agentJNI->FindClass(CLASS_NAME)) != NULL))
return;
if (!NSK_JNI_VERIFY(agentJNI, (methodID =
- NSK_CPP_STUB4(GetStaticMethodID, agentJNI, cls, METHOD_NAME,
- "()I")) != NULL))
+ agentJNI->GetStaticMethodID(cls, METHOD_NAME, "()I")) != NULL))
return;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(SetBreakpoint, jvmti, methodID, 0)))
+ if (!NSK_JVMTI_VERIFY(jvmti->SetBreakpoint(methodID, 0)))
return;
if (!nsk_jvmti_resumeSync())
return;
@@ -510,22 +500,21 @@
timeout = nsk_jvmti_getWaitTime() * 60 * 1000;
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;
}
{
jvmtiCapabilities caps;
memset(&caps, 0, sizeof(caps));
caps.can_generate_breakpoint_events = 1;
- if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+ if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
return JNI_ERR;
}
if (!setCallBacks(1)) {
return JNI_ERR;
< prev index next >