< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp
Print this page
rev 52050 : [mq]: refactor
@@ -35,12 +35,11 @@
jthread thread,
jclass klass) {
char * className;
char * generic;
int redefineNumber=0;
- if (! NSK_JVMTI_VERIFY( NSK_CPP_STUB4(GetClassSignature,
- jvmti_env, klass, &className, &generic)) ) {
+ if (! NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic)) ) {
nsk_printf(" Agent :: Error occured in getting class signature.\n");
return;
} else {
if (strcmp(className, CLASS_NAME) == 0) {
int redefineNumber =0;
@@ -69,12 +68,11 @@
}
#endif
jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
jvmtiEnv * jvmti;
nsk_printf("Agent:: VM Started.\n");
- if (! NSK_VERIFY ( JNI_OK == NSK_CPP_STUB3(GetEnv,
- vm, (void **)&jvmti, JVMTI_VERSION_1_1) ) ) {
+ if (! NSK_VERIFY ( JNI_OK == vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1) ) ) {
nsk_printf("Agent:: Could not load JVMTI interface \n");
return JNI_ERR;
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
@@ -83,19 +81,17 @@
return JNI_ERR;
}
memset(&caps, 0, sizeof(caps));
caps.can_redefine_classes = 1;
caps.can_generate_all_class_hook_events=1;
- if ( ! NSK_JVMTI_VERIFY ( NSK_CPP_STUB2(AddCapabilities,
- jvmti, &caps) )) {
+ if ( ! NSK_JVMTI_VERIFY (jvmti->AddCapabilities(&caps) )) {
nsk_printf(" Agent:: Error occured while adding capabilities.\n");
return JNI_ERR;
}
memset(&eventCallbacks, 0, sizeof(eventCallbacks));
eventCallbacks.ClassPrepare = &callbackClassPrepare;
- if ( ! NSK_JVMTI_VERIFY( NSK_CPP_STUB3(SetEventCallbacks,
- jvmti, &eventCallbacks, sizeof(eventCallbacks)) ) ) {
+ if ( ! NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)) ) ) {
nsk_printf(" Agent:: Error occured while setting event call back \n");
return JNI_ERR;
}
if ( nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE ) {
nsk_printf(" Enabled notification.\n");
< prev index next >