< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM05/em05t002/em05t002.cpp
Print this page
rev 52050 : [mq]: refactor
@@ -150,12 +150,11 @@
/**
* Generate tested events (COMPILED_METHOD_LOAD only).
*/
static int generateEvents() {
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) {
nsk_jvmti_setFailStatus();
return NSK_FALSE;
}
return NSK_TRUE;
}
@@ -181,32 +180,28 @@
methodsDesc[i].loadEvents[j] = 0;
methodsDesc[i].unloadEvents[j] = 0;
}
}
- if (!NSK_JNI_VERIFY(jni, (debugeeClass =
- NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
+ if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (threadFieldID =
- NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
- THREAD_FIELD_NAME, THREAD_FIELD_SIG)) != NULL))
+ jni->GetStaticFieldID(debugeeClass, THREAD_FIELD_NAME, THREAD_FIELD_SIG)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (thread = (jthread)
- NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, threadFieldID)) != NULL))
+ jni->GetStaticObjectField(debugeeClass, threadFieldID)) != NULL))
return NSK_FALSE;
- if (!NSK_JNI_VERIFY(jni, (threadClass =
- NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+ if (!NSK_JNI_VERIFY(jni, (threadClass = jni->GetObjectClass(thread)) != NULL))
return NSK_FALSE;
NSK_DISPLAY0("Find tested methods:\n");
for (i = 0; i < METHODS_COUNT; i++) {
if (!NSK_JNI_VERIFY(jni, (methodsDesc[i].method =
- NSK_CPP_STUB4(GetMethodID, jni, threadClass,
- methodsDesc[i].methodName, methodsDesc[i].methodSig)) != NULL))
+ jni->GetMethodID(threadClass, methodsDesc[i].methodName, methodsDesc[i].methodSig)) != NULL))
return NSK_FALSE;
NSK_DISPLAY3(" method #%d (%s): 0x%p\n",
i, methodsDesc[i].methodName, (void*)methodsDesc[i].method);
}
@@ -393,23 +388,20 @@
{
jvmtiCapabilities caps;
memset(&caps, 0, sizeof(caps));
caps.can_generate_compiled_method_load_events = 1;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+ if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
return JNI_ERR;
}
{
jvmtiEventCallbacks eventCallbacks;
memset(&eventCallbacks, 0, sizeof(eventCallbacks));
eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad;
eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload;
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(SetEventCallbacks, jvmti,
- &eventCallbacks, sizeof(eventCallbacks))))
+ if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
return JNI_ERR;
}
if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
return JNI_ERR;
< prev index next >