< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF06/gf06t001/gf06t001.cpp
Print this page
rev 52050 : [mq]: refactor
@@ -73,12 +73,11 @@
*/
static int checkEnvStorage(jvmtiEnv* jvmti, const char where[]) {
void* storage = NULL;
NSK_DISPLAY0("Calling GetEnvironmentLocalStorage():");
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(GetEnvironmentLocalStorage, jvmti, &storage))) {
+ if (!NSK_JVMTI_VERIFY(jvmti->GetEnvironmentLocalStorage(&storage))) {
return NSK_FALSE;
}
NSK_DISPLAY1(" ... got storage: 0x%p\n", (void*)storage);
if (storage != NULL) {
@@ -113,13 +112,13 @@
jthread getEnvThread(JNIEnv *env) {
jclass thrClass;
jmethodID cid;
jthread res;
- thrClass = NSK_CPP_STUB2(FindClass, env, "java/lang/Thread");
- cid = NSK_CPP_STUB4(GetMethodID, env, thrClass, "<init>", "()V");
- res = NSK_CPP_STUB3(NewObject, env, thrClass, cid);
+ thrClass = env->FindClass("java/lang/Thread");
+ cid = env->GetMethodID(thrClass, "<init>", "()V");
+ res = env->NewObject(thrClass, cid);
return res;
}
/* ============================================================================= */
@@ -191,12 +190,11 @@
NSK_COMPLAIN0("Wrong result of a valid call to GetEnv!\n");
return JNI_ERR;
}
NSK_DISPLAY1("Set local storage in JVM_OnLoad() for first JVMTI env: 0x%p\n", (void*)initialStorage);
- if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB2(SetEnvironmentLocalStorage, jvmti_1, initialStorage))) {
+ if (!NSK_JVMTI_VERIFY(jvmti_1->SetEnvironmentLocalStorage(initialStorage))) {
return JNI_ERR;
}
NSK_DISPLAY0(" ... ok\n");
/* Create second environment */
@@ -210,12 +208,11 @@
memset(&eventCallbacks, 0, sizeof(eventCallbacks));
eventCallbacks.VMInit = callbackVMInit;
eventCallbacks.VMDeath = callbackVMDeath;
if (!NSK_JVMTI_VERIFY(
- NSK_CPP_STUB3(SetEventCallbacks, jvmti_2,
- &eventCallbacks, sizeof(eventCallbacks)))) {
+ jvmti_2->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) {
return JNI_ERR;
}
}
< prev index next >