< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/GenerateEvents/genevents001/genevents001.cpp

Print this page
rev 51942 : [mq]: refactor

@@ -97,17 +97,15 @@
         if (!nsk_jvmti_enableEvents(JVMTI_ENABLE, EVENTS_COUNT, eventsList, NULL)) {
             nsk_jvmti_setFailStatus();
         }
 
         NSK_DISPLAY0("Call GenerateEvents() to send missed events\n");
-        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();
         }
 
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_DYNAMIC_CODE_GENERATED))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_DYNAMIC_CODE_GENERATED))) {
             nsk_jvmti_setFailStatus();
         }
 
         NSK_DISPLAY1("Disable events: %d events\n", EVENTS_COUNT);
         if (!nsk_jvmti_enableEvents(JVMTI_DISABLE, EVENTS_COUNT, eventsList, NULL)) {

@@ -193,25 +191,22 @@
     /* add required capabilities */
     {
         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;
     }
 
     /* set event callbacks */
     {
         jvmtiEventCallbacks eventCallbacks;
         memset(&eventCallbacks, 0, sizeof(eventCallbacks));
         eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad;
         eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload;
         eventCallbacks.DynamicCodeGenerated = callbackDynamicCodeGenerated;
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(SetEventCallbacks, jvmti,
-                                    &eventCallbacks, sizeof(eventCallbacks))))
+        if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return JNI_ERR;
     }
 
     return JNI_OK;
 }
< prev index next >