changeset 52081:ca7ddf0a1d47

8211801: Remove the NSK_CPP_STUB macros from vmTestbase for jvmti/scenarios/[A-E] Summary: Remove the NSK_CPP_STUB macros Reviewed-by: amenkov, sspitsyn
author jcbeyler
date Wed, 10 Oct 2018 11:20:21 -0700
parents a2c72b476c9f
children c99e4c010022
files test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/cm02t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/cm03t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC01/tc01t001/tc01t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001/tc02t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp
diffstat 50 files changed, 1986 insertions(+), 2636 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -124,7 +124,7 @@
 JNIEXPORT void JNICALL
 Java_nsk_jvmti_scenarios_allocation_AP06_ap06t001Thread_setTag( JNIEnv* jni, jobject obj) {
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, obj, threadTag))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, threadTag))) {
         nsk_jvmti_setFailStatus();
     } else {
         NSK_DISPLAY0("setTag: the tag was set for checked thread.");
@@ -153,34 +153,26 @@
         }
 
         if (!NSK_JNI_VERIFY(jni, (fid =
-                NSK_CPP_STUB4(GetStaticFieldID, jni,
-                                                debugeeClass,
-                                                "thread",
-                                                THREAD_CLS_SIGNATURE)) != NULL )) {
+                jni->GetStaticFieldID(debugeeClass, "thread", THREAD_CLS_SIGNATURE)) != NULL)) {
             nsk_jvmti_setFailStatus();
             break;
         }
 
         if (!NSK_JNI_VERIFY(jni, (localRefThread =
-                NSK_CPP_STUB3(GetStaticObjectField, jni,
-                                                    debugeeClass,
-                                                    fid )) != NULL )) {
+                jni->GetStaticObjectField(debugeeClass, fid)) != NULL)) {
             NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'thread' field value\n\n");
             nsk_jvmti_setFailStatus();
             break;
         }
 
-        if (!NSK_JNI_VERIFY(jni, (globalRefThread =
-                 NSK_CPP_STUB2(NewGlobalRef, jni, localRefThread)) != NULL))
+        if (!NSK_JNI_VERIFY(jni, (globalRefThread = jni->NewGlobalRef(localRefThread)) != NULL))
             return;
 
         NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                                                           heapRootCallback,
-                                                           stackReferenceCallback,
-                                                           objectReferenceCallback,
-                                                           NULL /*user_data*/))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
+                                                                 stackReferenceCallback,
+                                                                 objectReferenceCallback,
+                                                                 NULL /*user_data*/))) {
             nsk_jvmti_setFailStatus();
             break;
         }
@@ -234,12 +226,10 @@
     memset(&caps, 0, sizeof(jvmtiCapabilities));
     caps.can_tag_objects = 1;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_tag_objects)
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -111,15 +111,14 @@
                                                           jobject target,
                                                           jlong   tag ) {
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
         nsk_jvmti_setFailStatus();
     }
 }
 
 JNIEXPORT void JNICALL
 Java_nsk_jvmti_scenarios_allocation_AP07_ap07t001_setRoot( JNIEnv* jni, jobject obj) {
-    if (!NSK_JNI_VERIFY(jni, (root =
-            NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (root = jni->NewGlobalRef(obj)) != NULL))
         nsk_jvmti_setFailStatus();
 }
 
@@ -135,30 +134,24 @@
     do {
 
         NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                                                           heapRootCallback,
-                                                           stackReferenceCallback,
-                                                           objectReferenceCallback,
-                                                           NULL /*user_data*/))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
+                                                                 stackReferenceCallback,
+                                                                 objectReferenceCallback,
+                                                                 NULL /*user_data*/))) {
             nsk_jvmti_setFailStatus();
             break;
         }
 
         NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject\n");
         {
-            if (!NSK_JVMTI_VERIFY(
-                    NSK_CPP_STUB4(IterateOverObjectsReachableFromObject,
-                        jvmti,
-                        root,
-                        objectReferenceCallback,
-                        NULL /*user_data*/))) {
+            if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(
+                    root, objectReferenceCallback, NULL /*user_data*/))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
         }
 
-        NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, root));
+        NSK_TRACE(jni->DeleteGlobalRef(root));
 
     } while (0);
 
@@ -191,12 +184,10 @@
     memset(&caps, 0, sizeof(jvmtiCapabilities));
     caps.can_tag_objects = 1;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_tag_objects)
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -111,7 +111,7 @@
                                                           jobject target,
                                                           jlong   tag ) {
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
         nsk_jvmti_setFailStatus();
     }
 }
@@ -128,12 +128,10 @@
     do {
 
         NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                                                           heapRootCallback,
-                                                           stackReferenceCallback,
-                                                           objectReferenceCallback,
-                                                           NULL /*user_data*/))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
+                                                                 stackReferenceCallback,
+                                                                 objectReferenceCallback,
+                                                                 NULL /*user_data*/))) {
             nsk_jvmti_setFailStatus();
             break;
         }
@@ -169,12 +167,10 @@
     memset(&caps, 0, sizeof(jvmtiCapabilities));
     caps.can_tag_objects = 1;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_tag_objects)
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -132,15 +132,14 @@
                                                           jobject target,
                                                           jlong   tag ) {
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
         nsk_jvmti_setFailStatus();
     }
 }
 
 JNIEXPORT void JNICALL
 Java_nsk_jvmti_scenarios_allocation_AP09_ap09t001_setReferrer( JNIEnv* jni, jclass klass, jobject ref) {
-    if (!NSK_JNI_VERIFY(jni, (referrer =
-            NSK_CPP_STUB2(NewGlobalRef, jni, ref)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (referrer = jni->NewGlobalRef(ref)) != NULL))
         nsk_jvmti_setFailStatus();
 }
 
@@ -155,12 +154,9 @@
 
     do {
         NSK_DISPLAY0("\nCalling IterateOverObjectsReachableFromObject\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(IterateOverObjectsReachableFromObject,
-                    jvmti,
-                    referrer,
-                    objectReferenceCallback,
-                    NULL /*user_data*/))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(referrer,
+                                                                           objectReferenceCallback,
+                                                                           NULL /*user_data*/))) {
             nsk_jvmti_setFailStatus();
         }
         if (!classFound) {
@@ -192,7 +188,7 @@
             nsk_jvmti_setFailStatus();
         }
 
-        NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, referrer));
+        NSK_TRACE(jni->DeleteGlobalRef(referrer));
     } while (0);
 
     NSK_DISPLAY0("Let debugee to finish\n");
@@ -224,12 +220,10 @@
     memset(&caps, 0, sizeof(jvmtiCapabilities));
     caps.can_tag_objects = 1;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_tag_objects) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -61,8 +61,7 @@
 
     NSK_DISPLAY2("%s: setting an environment local storage 0x%p ...\n",
         msg, (void*) &stor);
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SetEnvironmentLocalStorage,
-            jvmti_env, (const void*) &stor))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->SetEnvironmentLocalStorage((const void*) &stor))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: unable to set an environment local storage\n\n",
             msg);
@@ -71,8 +70,7 @@
 
     NSK_DISPLAY1("%s: getting an environment local storage ...\n",
         msg);
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetEnvironmentLocalStorage,
-            jvmti_env, (void**) &obtainedData))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->GetEnvironmentLocalStorage((void**) &obtainedData))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: unable to get an environment local storage\n\n",
             msg);
@@ -90,8 +88,7 @@
 }
 
 static void timerFunc(jvmtiEnv *jvmti_env, const char *msg) {
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti_env, &timer_info1 ))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->GetCurrentThreadCpuTimerInfo(&timer_info1))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: GetCurrentThreadCpuTimerInfo returned unexpected error code\n\n",
             msg);
@@ -114,8 +111,7 @@
     }
     /* ---------------------------------------------------------------------- */
 
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti_env, &nanos ))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->GetCurrentThreadCpuTime(&nanos))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: GetCurrentThreadCpuTime returned unexpected error code\n\n",
             msg);
@@ -123,8 +119,7 @@
     /* ---------------------------------------------------------------------- */
 
 
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetTimerInfo, jvmti_env, &timer_info2 ))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->GetTimerInfo(&timer_info2))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: GetTimerInfo returned unexpected error code\n\n",
             msg);
@@ -148,8 +143,7 @@
     /* ---------------------------------------------------------------------- */
 
     nanos = 0;
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetTime, jvmti_env, &nanos ))) {
+    if (!NSK_JVMTI_VERIFY(jvmti_env->GetTime(&nanos))) {
         nsk_jvmti_setFailStatus();
         NSK_COMPLAIN1("%s: GetTime returned unexpected error code\n\n",
             msg);
@@ -223,10 +217,9 @@
 
     NSK_DISPLAY0("Call IterateOverHeap to tag random objects for ObjectFree evnts\n\n");
     {
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(IterateOverHeap, jvmti,
-                    JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback,
-                    &user_data))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_UNTAGGED,
+                                                     heapObjectCallback,
+                                                     &user_data))) {
             nsk_jvmti_setFailStatus();
         }
     }
@@ -276,12 +269,10 @@
     caps.can_get_thread_cpu_time = 1;
     caps.can_generate_object_free_events = 1;
     caps.can_generate_garbage_collection_events = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_generate_garbage_collection_events)
@@ -299,19 +290,21 @@
     callbacks.GarbageCollectionFinish = &GarbageCollectionFinish;
     callbacks.ObjectFree = &ObjectFree;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
-            jvmti, &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
 
     NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_GARBAGE_COLLECTION_START,
+                                                          NULL)))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
+                                                          NULL)))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_OBJECT_FREE,
+                                                          NULL)))
         return JNI_ERR;
     NSK_DISPLAY0("enabling the events done\n\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -43,8 +43,7 @@
     jint i;
 
     for (i = 0; i < classCount && !found; i++) {
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti,
-                classes[i], &signature, &generic)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(classes[i], &signature, &generic)))
             break;
 
         if (signature != NULL && strcmp(signature, exp_sig) == 0) {
@@ -52,10 +51,10 @@
         }
 
         if (signature != NULL)
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature);
+            jvmti->Deallocate((unsigned char*)signature);
 
         if (generic != NULL)
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic);
+            jvmti->Deallocate((unsigned char*)generic);
     }
 
     return found;
@@ -74,7 +73,7 @@
     */
     {
         jvmtiPhase phase;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase ))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
             return;
         }
@@ -85,14 +84,12 @@
     }
 
     do {
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti,
-                object_klass, &signature, &generic))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(object_klass, &signature, &generic))) {
             nsk_jvmti_setFailStatus();
             break;
         }
 
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti,
-                thread, &threadInfo))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) {
             nsk_jvmti_setFailStatus();
             break;
         }
@@ -108,14 +105,13 @@
         jint i;
         jboolean found = JNI_FALSE;
 
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetAllThreads, jvmti,
-                 &threadCount, &threads))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadCount, &threads))) {
             nsk_jvmti_setFailStatus();
             break;
         }
 
         for (i = 0; i < threadCount && !found; i++) {
-            found = NSK_CPP_STUB3(IsSameObject, jni, threads[i], thread);
+            found = jni->IsSameObject(threads[i], thread);
             if (found == JNI_TRUE) {
                 break;
             }
@@ -134,8 +130,7 @@
         jint classCount;
         jclass *classes;
 
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetLoadedClasses, jvmti,
-                 &classCount, &classes))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetLoadedClasses(&classCount, &classes))) {
             nsk_jvmti_setFailStatus();
             break;
         }
@@ -147,7 +142,7 @@
         }
 
         if (classes != NULL)
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)classes);
+            jvmti->Deallocate((unsigned char*)classes);
     } while(0);
 
 
@@ -155,8 +150,8 @@
     */
     {
         jclass klass;
-        klass = NSK_CPP_STUB2(GetObjectClass, jni, object);
-        if (!(NSK_CPP_STUB3(IsSameObject, jni, object_klass, klass))) {
+        klass = jni->GetObjectClass(object);
+        if (!(jni->IsSameObject(object_klass, klass))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("VMObjectAlloc: unexpected object_klass : \"%s\"\n\n", signature);
         }
@@ -167,8 +162,7 @@
 
     do {
         jlong objSize;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectSize, jvmti,
-                 object, &objSize))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectSize(object, &objSize))) {
             nsk_jvmti_setFailStatus();
             break;
         }
@@ -181,10 +175,10 @@
     } while(0);
 
     if (signature != NULL)
-        NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature);
+        jvmti->Deallocate((unsigned char*)signature);
 
     if (generic != NULL)
-        NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic);
+        jvmti->Deallocate((unsigned char*)generic);
 }
 
 /* ========================================================================== */
@@ -234,21 +228,18 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.can_generate_vm_object_alloc_events = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
         return JNI_ERR;
     }
 
     memset(&callbacks, 0, sizeof(callbacks));
     callbacks.VMObjectAlloc= &VMObjectAlloc;
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
-                &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
 
     /* enable VMObjectAlloc event */
     if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
-                JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
+            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
         return JNI_ERR;
 
     /* register agent proc and arg */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -79,8 +79,7 @@
 JNIEXPORT void JNICALL
 Java_nsk_jvmti_scenarios_allocation_AP12_ap12t001_setTag( JNIEnv* jni, jobject obj, jlong tag) {
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag,
-         jvmti, obj, tag))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, tag))) {
          nsk_jvmti_setFailStatus();
     }
 }
@@ -129,12 +128,10 @@
     memset(&caps, 0, sizeof(jvmtiCapabilities));
     caps.can_generate_object_free_events = 1;
     caps.can_tag_objects = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
-            jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
     if (!caps.can_generate_object_free_events)
@@ -149,16 +146,17 @@
     callbacks.ObjectFree = &ObjectFree;
     callbacks.VMDeath = &VMDeath;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
-            jvmti, &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
 
     NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_OBJECT_FREE,
+                                                          NULL)))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_VM_DEATH,
+                                                          NULL)))
         return JNI_ERR;
     NSK_DISPLAY0("enabling the events done\n\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -52,23 +52,20 @@
     jbyte* elements;
     jboolean isCopy;
 
-    if (!NSK_JNI_VERIFY(jni_env, (newClassSize =
-            NSK_CPP_STUB2(GetArrayLength, jni_env, byteCode)) > 0)) {
+    if (!NSK_JNI_VERIFY(jni_env, (newClassSize = jni_env->GetArrayLength(byteCode)) > 0)) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
     NSK_DISPLAY1("\t... got array size: %d\n", newClassSize);
 
     if (!NSK_JNI_VERIFY(jni_env, (elements =
-            NSK_CPP_STUB3(GetByteArrayElements, jni_env, byteCode,
-                                                        &isCopy)) != NULL)) {
+            jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
     NSK_DISPLAY1("\t... got elements list: 0x%p\n", (void*)elements);
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
-                                newClassSize, &newClassBytes))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(newClassSize, &newClassBytes))) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
@@ -82,7 +79,7 @@
     NSK_DISPLAY1("\t... copied bytecode: %d bytes\n", (int)newClassSize);
 
     NSK_DISPLAY1("\t... release elements list: 0x%p\n", (void*)elements);
-    NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni_env, byteCode, elements, JNI_ABORT));
+    NSK_TRACE(jni_env->ReleaseByteArrayElements(byteCode, elements, JNI_ABORT));
     NSK_DISPLAY0("\t... released\n");
     return NSK_TRUE;
 }
@@ -98,7 +95,7 @@
                         jobject o, jclass cls) {
 
     if (!NSK_JNI_VERIFY(jni_env, (oldClassDef.klass = (jclass)
-             NSK_CPP_STUB2(NewGlobalRef, jni_env, cls)) != NULL)) {
+             jni_env->NewGlobalRef(cls)) != NULL)) {
         nsk_jvmti_setFailStatus();
     }
 }
@@ -129,9 +126,7 @@
         unsigned char *arr;
 
         oldClassDef.class_byte_count = class_data_len;
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(Allocate, jvmti_env, class_data_len,
-                                &arr))) {
+        if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(class_data_len, &arr))) {
             nsk_jvmti_setFailStatus();
             return;
         }
@@ -181,9 +176,9 @@
         return;
 
     NSK_DISPLAY0("Notification disabled for CLASS_FILE_LOAD_HOOK event\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
-                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL))) {
         nsk_jvmti_setFailStatus();
         return;
     }
@@ -205,8 +200,7 @@
         nsk_printHexBytes("   ", 16, oldClassDef.class_byte_count,
                                 oldClassDef.class_bytes);
     }
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &oldClassDef))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &oldClassDef))) {
         nsk_jvmti_setFailStatus();
         return;
     }
@@ -219,7 +213,7 @@
     if (!nsk_jvmti_waitForSync(timeout))
         return;
 
-    NSK_CPP_STUB2(DeleteGlobalRef, agentJNI, oldClassDef.klass);
+    agentJNI->DeleteGlobalRef(oldClassDef.klass);
 
     NSK_DISPLAY0("Let debuggee to finish\n");
     if (!nsk_jvmti_resumeSync())
@@ -256,7 +250,7 @@
         memset(&caps, 0, sizeof(caps));
 
         caps.can_redefine_classes = 1;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     }
 
@@ -267,16 +261,15 @@
 
         memset(&callbacks, 0, size);
         callbacks.ClassFileLoadHook = cbClassFileLoadHook;
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) {
             return JNI_ERR;
         }
     }
 
     NSK_DISPLAY0("Set notification enabled for CLASS_FILE_LOAD_HOOK event\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
-                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL))) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -54,23 +54,20 @@
     jbyte* elements;
     jboolean isCopy;
 
-    if (!NSK_JNI_VERIFY(jni_env, (newClassSize[ind] =
-            NSK_CPP_STUB2(GetArrayLength, jni_env, byteCode)) > 0)) {
+    if (!NSK_JNI_VERIFY(jni_env, (newClassSize[ind] = jni_env->GetArrayLength(byteCode)) > 0)) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
     NSK_DISPLAY1("\t... got array size: %d\n", newClassSize[ind]);
 
     if (!NSK_JNI_VERIFY(jni_env, (elements =
-            NSK_CPP_STUB3(GetByteArrayElements, jni_env, byteCode,
-                                                        &isCopy)) != NULL)) {
+            jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
     NSK_DISPLAY1("\t... got elements list: 0x%p\n", (void*)elements);
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
-                                newClassSize[ind], &newClassBytes[ind]))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(newClassSize[ind], &newClassBytes[ind]))) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
@@ -84,7 +81,7 @@
     NSK_DISPLAY1("\t... copied bytecode: %d bytes\n", (int)newClassSize[ind]);
 
     NSK_DISPLAY1("\t... release elements list: 0x%p\n", (void*)elements);
-    NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni_env, byteCode, elements, JNI_ABORT));
+    NSK_TRACE(jni_env->ReleaseByteArrayElements(byteCode, elements, JNI_ABORT));
     NSK_DISPLAY0("\t... released\n");
     return NSK_TRUE;
 }
@@ -100,7 +97,7 @@
                         jobject o, jint ind, jclass cls) {
 
     if (!NSK_JNI_VERIFY(jni_env, (oldClassDef[ind].klass = (jclass)
-             NSK_CPP_STUB2(NewGlobalRef, jni_env, cls)) != NULL)) {
+             jni_env->NewGlobalRef(cls)) != NULL)) {
         nsk_jvmti_setFailStatus();
     }
 }
@@ -131,9 +128,7 @@
         unsigned char *arr;
 
         oldClassDef[clsLoadedIdx].class_byte_count = class_data_len;
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(Allocate, jvmti_env, class_data_len,
-                                &arr))) {
+        if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(class_data_len, &arr))) {
             nsk_jvmti_setFailStatus();
             return;
         }
@@ -189,9 +184,9 @@
         return;
 
     NSK_DISPLAY0("Notification disabled for CLASS_FILE_LOAD_HOOK event\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
-                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL))) {
         nsk_jvmti_setFailStatus();
         return;
     }
@@ -216,9 +211,7 @@
                                     oldClassDef[i].class_bytes);
         }
     }
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(RedefineClasses, jvmti, TOTAL_INSTRUMENTED_CLASSES,
-                            oldClassDef))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(TOTAL_INSTRUMENTED_CLASSES, oldClassDef))) {
         nsk_jvmti_setFailStatus();
         return;
     }
@@ -232,7 +225,7 @@
         return;
 
     for (i = 0; i < TOTAL_INSTRUMENTED_CLASSES; i++) {
-        NSK_CPP_STUB2(DeleteGlobalRef, agentJNI, oldClassDef[i].klass);
+        agentJNI->DeleteGlobalRef(oldClassDef[i].klass);
     }
 
     NSK_DISPLAY0("Let debuggee to finish\n");
@@ -270,7 +263,7 @@
         memset(&caps, 0, sizeof(caps));
 
         caps.can_redefine_classes = 1;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     }
 
@@ -281,16 +274,15 @@
 
         memset(&callbacks, 0, size);
         callbacks.ClassFileLoadHook = cbClassFileLoadHook;
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) {
             return JNI_ERR;
         }
     }
 
     NSK_DISPLAY0("Set notification enabled for CLASS_FILE_LOAD_HOOK event\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
-                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL))) {
         nsk_jvmti_setFailStatus();
         return NSK_FALSE;
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -63,13 +63,13 @@
             /* sent by class load */
 
             if (!NSK_JNI_VERIFY(jni_env, (*new_class_data_len =
-                    NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes)) > 0)) {
+                    jni_env->GetArrayLength(classBytes)) > 0)) {
                 nsk_jvmti_setFailStatus();
                 return;
             }
 
             if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
-                    NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, NULL))
+                    jni_env->GetByteArrayElements(classBytes, NULL))
                         != NULL)) {
                 nsk_jvmti_setFailStatus();
                 return;
@@ -86,30 +86,27 @@
     jfieldID field = NULL;
 
     NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
-    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, (debugeeClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
-                "newClassBytes", "[B")) != NULL))
+            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
+            jni->GetStaticObjectField(debugeeClass, field))
                 != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL)))
         return JNI_ERR;
 
     return NSK_TRUE;
@@ -140,12 +137,13 @@
         nsk_jvmti_setFailStatus();
     }
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL)))
         nsk_jvmti_setFailStatus();
 
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
+    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
+    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
 
     if (!nsk_jvmti_resumeSync())
         return;
@@ -183,7 +181,7 @@
 
     memset(&caps, 0, sizeof(caps));
     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)))
         return JNI_ERR;
 
     if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
@@ -191,8 +189,7 @@
 
     memset(&callbacks, 0, sizeof(callbacks));
     callbacks.ClassFileLoadHook = &ClassFileLoadHook;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
-            jvmti, &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
 
     return JNI_OK;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -52,35 +52,29 @@
     jfieldID field = NULL;
 
     NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
-    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, (debugeeClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
-                "newClassBytes", "[B")) != NULL))
+            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
+            jni->GetStaticObjectField(debugeeClass, field))
                 != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY1("Find class: %s\n", CLASS_NAME);
-    if (!NSK_JNI_VERIFY(jni, (testedClass =
-            NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (testedClass = jni->FindClass(CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)jni->NewGlobalRef(testedClass)) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -93,17 +87,16 @@
 
     NSK_DISPLAY0("Redefining ...\n");
 
-    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count =
-            NSK_CPP_STUB2(GetArrayLength, jni, classBytes)) > 0))
+    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count = jni->GetArrayLength(classBytes)) > 0))
         return NSK_TRUE;
 
     if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
-            NSK_CPP_STUB3(GetByteArrayElements, jni, classBytes, NULL))
+            jni->GetByteArrayElements(classBytes, NULL))
                 != NULL))
         return NSK_TRUE;
 
     class_def.klass = testedClass;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -132,9 +125,9 @@
     if (!nsk_jvmti_waitForSync(timeout))
         return;
 
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass));
+    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
+    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
+    NSK_TRACE(jni->DeleteGlobalRef(testedClass));
 
     if (!nsk_jvmti_resumeSync())
         return;
@@ -171,7 +164,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.can_redefine_classes = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -63,13 +63,13 @@
             /* sent by class load */
 
             if (!NSK_JNI_VERIFY(jni_env, (*new_class_data_len =
-                    NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes)) > 0)) {
+                    jni_env->GetArrayLength(classBytes)) > 0)) {
                 nsk_jvmti_setFailStatus();
                 return;
             }
 
             if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
-                    NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, NULL))
+                    jni_env->GetByteArrayElements(classBytes, NULL))
                         != NULL)) {
                 nsk_jvmti_setFailStatus();
                 return;
@@ -86,30 +86,27 @@
     jfieldID field = NULL;
 
     NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
-    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, (debugeeClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
-                "newClassBytes", "[B")) != NULL))
+            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
+            jni->GetStaticObjectField(debugeeClass, field))
                 != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL)))
         return JNI_ERR;
 
     return NSK_TRUE;
@@ -140,12 +137,13 @@
         nsk_jvmti_setFailStatus();
     }
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
+                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
+                                                          NULL)))
         nsk_jvmti_setFailStatus();
 
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
+    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
+    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
 
     if (!nsk_jvmti_resumeSync())
         return;
@@ -183,7 +181,7 @@
 
     memset(&caps, 0, sizeof(caps));
     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)))
         return JNI_ERR;
 
     if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
@@ -191,8 +189,7 @@
 
     memset(&callbacks, 0, sizeof(callbacks));
     callbacks.ClassFileLoadHook = &ClassFileLoadHook;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
-            jvmti, &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
 
     return JNI_OK;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -52,35 +52,29 @@
     jfieldID field = NULL;
 
     NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
-    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, (debugeeClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
-                "newClassBytes", "[B")) != NULL))
+            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
+            jni->GetStaticObjectField(debugeeClass, field))
                 != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
-            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY1("Find class: %s\n", CLASS_NAME);
-    if (!NSK_JNI_VERIFY(jni, (testedClass =
-            NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (testedClass = jni->FindClass(CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)jni->NewGlobalRef(testedClass)) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -93,17 +87,16 @@
 
     NSK_DISPLAY0("Redefining ...\n");
 
-    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count =
-            NSK_CPP_STUB2(GetArrayLength, jni, classBytes)) > 0))
+    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count = jni->GetArrayLength(classBytes)) > 0))
         return NSK_TRUE;
 
     if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
-            NSK_CPP_STUB3(GetByteArrayElements, jni, classBytes, NULL))
+            jni->GetByteArrayElements(classBytes, NULL))
                 != NULL))
         return NSK_TRUE;
 
     class_def.klass = testedClass;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -132,9 +125,9 @@
     if (!nsk_jvmti_waitForSync(timeout))
         return;
 
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
-    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass));
+    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
+    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
+    NSK_TRACE(jni->DeleteGlobalRef(testedClass));
 
     if (!nsk_jvmti_resumeSync())
         return;
@@ -171,7 +164,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.can_redefine_classes = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -69,9 +69,7 @@
     classDef.class_byte_count = ftell(bytecode);
     rewind(bytecode);
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
-                                classDef.class_byte_count,
-                                &newClassBytes))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(classDef.class_byte_count, &newClassBytes))) {
         NSK_COMPLAIN0("buffer couldn't be allocated\n");
         return NSK_FALSE;
     }
@@ -99,14 +97,13 @@
         return;
 
     NSK_DISPLAY1("Find class: %s\n", TESTED_CLASS_NAME);
-    if (!NSK_JNI_VERIFY(jni, (classDef.klass =
-            NSK_CPP_STUB2(FindClass, jni, TESTED_CLASS_NAME)) != NULL)) {
+    if (!NSK_JNI_VERIFY(jni, (classDef.klass = jni->FindClass(TESTED_CLASS_NAME)) != NULL)) {
         nsk_jvmti_setFailStatus();
         return;
     }
 
     if (!NSK_JNI_VERIFY(jni, (classDef.klass = (jclass)
-            NSK_CPP_STUB2(NewGlobalRef, jni, classDef.klass)) != NULL)) {
+            jni->NewGlobalRef(classDef.klass)) != NULL)) {
         nsk_jvmti_setFailStatus();
         return;
     }
@@ -120,13 +117,12 @@
         nsk_printHexBytes("   ", 16, classDef.class_byte_count,
                                 classDef.class_bytes);
     }
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) {
         nsk_jvmti_setFailStatus();
         return;
     }
 
-    NSK_CPP_STUB2(DeleteGlobalRef, jni, classDef.klass);
+    jni->DeleteGlobalRef(classDef.klass);
 
     if (!nsk_jvmti_resumeSync())
         return;
@@ -163,7 +159,7 @@
 
         caps.can_redefine_classes = 1;
         caps.can_redefine_any_class = 1;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -79,8 +79,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -92,8 +91,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -105,24 +103,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -136,23 +130,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -168,27 +160,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -202,7 +190,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -215,7 +203,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -225,8 +213,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -269,44 +256,36 @@
     jint dummy_user_data = 0;
 
     NSK_DISPLAY0("Checking positive: SetTag\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: GetTag\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: GetObjectsWithTags\n");
     tag = TAG_VALUE;
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IterateOverInstancesOfClass\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(
+            klass, JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IterateOverObjectsReachableFromObject\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(
+            thread, ObjectReference, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IterateOverReachableObjects\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(
+            HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -325,58 +304,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -391,18 +369,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -418,7 +395,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -431,7 +408,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -444,12 +421,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -463,7 +440,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -477,12 +454,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -496,12 +473,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -597,7 +574,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -609,13 +586,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -627,13 +604,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -645,10 +622,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -72,8 +72,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -85,8 +84,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -98,24 +96,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -129,23 +123,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -161,27 +153,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -195,7 +183,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -208,7 +196,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -218,8 +206,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -263,43 +250,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -318,58 +307,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,18 +372,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -411,7 +398,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -424,7 +411,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -437,12 +424,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -455,10 +442,9 @@
     unsigned char *bytecodes;
 
     NSK_DISPLAY0("Checking positive: GetBytecodes\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, bytecodes)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -472,12 +458,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,12 +477,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -592,7 +578,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -604,13 +590,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -622,13 +608,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -640,10 +626,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -131,23 +125,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -163,27 +155,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -197,7 +185,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -210,7 +198,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -220,8 +208,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -265,43 +252,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -320,58 +309,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -386,18 +374,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -413,7 +400,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -426,7 +413,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -438,13 +425,11 @@
     jboolean is_synthetic;
 
     NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -458,7 +443,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -472,12 +457,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,12 +476,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -592,7 +577,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -604,13 +589,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -622,13 +607,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -640,10 +625,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -72,8 +72,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -85,8 +84,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -98,24 +96,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -129,23 +123,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -161,27 +153,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -194,8 +182,7 @@
     jobject *monitors = NULL;
 
     NSK_DISPLAY0("Checking positive: GetOwnedMonitorInfo\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -208,7 +195,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -218,8 +205,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -263,43 +249,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -318,58 +306,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,18 +371,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -411,7 +397,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -424,7 +410,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -437,12 +423,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -456,7 +442,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -470,12 +456,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -489,12 +475,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: checkGetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -590,7 +576,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -602,13 +588,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -620,13 +606,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -638,10 +624,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -72,8 +72,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -85,8 +84,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -98,24 +96,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -129,23 +123,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -161,27 +153,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -195,7 +183,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -207,8 +195,7 @@
     jobject monitor = NULL;
 
     NSK_DISPLAY0("Checking positive: GetCurrentContendedMonitor\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -218,8 +205,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -263,43 +249,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -318,58 +306,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,18 +371,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -411,7 +397,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -424,7 +410,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -437,12 +423,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -456,7 +442,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -470,12 +456,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -489,12 +475,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -590,7 +576,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -602,13 +588,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -620,13 +606,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -638,10 +624,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -72,8 +72,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -85,8 +84,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -98,24 +96,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -129,23 +123,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -161,27 +153,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -195,7 +183,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -208,7 +196,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -218,8 +206,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -263,43 +250,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -318,58 +307,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,18 +372,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -411,7 +398,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -423,8 +410,7 @@
     jvmtiMonitorUsage monitor_info;
 
     NSK_DISPLAY0("Checking positive: GetObjectMonitorUsage\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -437,12 +423,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -456,7 +442,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -470,12 +456,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -489,12 +475,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -590,7 +576,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -602,13 +588,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -620,13 +606,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -638,10 +624,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -72,8 +72,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -85,8 +84,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -98,23 +96,19 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingFlag' */
-    if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass, "waitingFlag", "Z")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "waitingFlag", "Z")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -128,23 +122,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -160,27 +152,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -194,7 +182,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -207,7 +195,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -223,23 +211,23 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.can_suspend = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     // PopFrame is allowed to fail with JVMTI_ERROR_OPAQUE_FRAME.
     // That will happen if we are in a native function, for example while waiting for a Condition.
     // See JCK-5020108.
-    err = NSK_CPP_STUB2(PopFrame, jvmti, thread);
+    err = jvmti->PopFrame(thread);
     if (err != JVMTI_ERROR_NONE && err != JVMTI_ERROR_OPAQUE_FRAME) {
       NSK_DISPLAY1("jvmti error from PopFrame: %d\n", err);
       return NSK_FALSE;
     }
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
         return NSK_FALSE;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     return NSK_TRUE;
@@ -283,43 +271,47 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED,
+                                   HeapObject,
+                                   &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -338,58 +330,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -404,18 +395,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -431,7 +421,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -444,7 +434,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -457,12 +447,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -476,7 +466,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -490,12 +480,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -509,12 +499,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -610,7 +600,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -622,13 +612,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -640,13 +630,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -658,10 +648,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -76,8 +76,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -89,8 +88,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -102,24 +100,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -133,23 +127,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -165,27 +157,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -199,7 +187,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -212,7 +200,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -222,8 +210,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -267,43 +254,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -322,58 +311,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -388,18 +376,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -415,12 +402,11 @@
     class_def.klass = klass;
     class_def.class_byte_count = klass_byte_count;
     class_def.class_bytes = klass_bytes;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: IsMethodObsolete\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(IsMethodObsolete, jvmti, method, &is_obsolete)))
+    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodObsolete(method, &is_obsolete)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -433,7 +419,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -446,12 +432,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -465,7 +451,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -479,12 +465,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -498,12 +484,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -521,15 +507,14 @@
 
     if (name != NULL && (strcmp(name, CLASS_NAME) == 0)) {
         NSK_DISPLAY1("ClassFileLoadHook: %s\n", name);
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate,
-            jvmti, class_data_len, &klass_bytes)))
+        if (!NSK_JVMTI_VERIFY(jvmti->Allocate(class_data_len, &klass_bytes)))
             nsk_jvmti_setFailStatus();
         else {
             memcpy(klass_bytes, class_data, class_data_len);
             klass_byte_count = class_data_len;
         }
-        NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
+        NSK_JVMTI_VERIFY(
+            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
     }
 }
 
@@ -624,7 +609,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -636,13 +621,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -654,13 +639,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -672,10 +657,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -686,11 +671,10 @@
     /* activate ClassFileLoadHook to get class file data */
     memset(&callbacks, 0, sizeof(callbacks));
     callbacks.ClassFileLoadHook = &ClassFileLoadHook;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
-            jvmti, &callbacks, sizeof(callbacks))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
-            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
+    if (!NSK_JVMTI_VERIFY(
+        jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
         return JNI_ERR;
 
     return JNI_OK;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -131,23 +125,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -163,25 +155,22 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: StopThread\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+    if (!NSK_JVMTI_VERIFY(jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -195,7 +184,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -208,7 +197,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -218,8 +207,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -263,43 +251,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -318,58 +308,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,18 +373,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -411,7 +399,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -424,7 +412,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -437,12 +425,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -456,7 +444,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -470,12 +458,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -489,12 +477,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -590,7 +578,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -602,13 +590,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -620,13 +608,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -638,10 +626,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -73,8 +73,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -86,8 +85,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -99,24 +97,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -130,23 +124,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -162,27 +154,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -196,7 +184,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -209,7 +197,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -219,8 +207,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -264,43 +251,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -319,58 +308,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -384,19 +372,17 @@
     jvmtiLineNumberEntry *line_number_table = NULL;
 
     NSK_DISPLAY0("Checking positive: GetSourceFileName\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -412,7 +398,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -425,7 +411,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -438,12 +424,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -457,7 +443,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -471,12 +457,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -490,12 +476,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -591,7 +577,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -603,13 +589,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -621,13 +607,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -639,10 +625,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -83,8 +83,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -96,8 +95,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -109,24 +107,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -140,23 +134,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -172,27 +164,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -206,7 +194,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -219,7 +207,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -229,8 +217,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -274,43 +261,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -333,83 +322,80 @@
 */
 
     NSK_DISPLAY0("Checking positive: GetLocalVariableTable\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
 /* DEBUG -- while thread should be suspended
     memset(&caps, 0, sizeof(caps));
     caps.can_suspend = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 */
 
     for (i = 0; i < count; i++) {
         if (strcmp(local_variable_table[i].name, "o") ==0) {
             NSK_DISPLAY0("Checking positive: GetLocalObject\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalObject, jvmti,
-                    thread, 1, local_variable_table[i].slot, &object_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->GetLocalObject(thread, 1, local_variable_table[i].slot, &object_value)))
                 return NSK_FALSE;
 
             NSK_DISPLAY0("Checking positive: SetLocalObject\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalObject, jvmti,
-                    thread, 1, local_variable_table[i].slot, object_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->SetLocalObject(thread, 1, local_variable_table[i].slot, object_value)))
                 return NSK_FALSE;
         } else if (strcmp(local_variable_table[i].name, "i") ==0) {
             NSK_DISPLAY0("Checking positive: GetLocalInt\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalInt, jvmti,
-                    thread, 1, local_variable_table[i].slot, &int_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->GetLocalInt(thread, 1, local_variable_table[i].slot, &int_value)))
                 return NSK_FALSE;
 
             NSK_DISPLAY0("Checking positive: SetLocalInt\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalInt, jvmti,
-                    thread, 1, local_variable_table[i].slot, int_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->SetLocalInt(thread, 1, local_variable_table[i].slot, int_value)))
                 return NSK_FALSE;
         } else if (strcmp(local_variable_table[i].name, "l") ==0) {
             NSK_DISPLAY0("Checking positive: GetLocalLong\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalLong, jvmti,
-                    thread, 1, local_variable_table[i].slot, &long_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->GetLocalLong(thread, 1, local_variable_table[i].slot, &long_value)))
                 return NSK_FALSE;
 
             NSK_DISPLAY0("Checking positive: SetLocalLong\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalLong, jvmti,
-                    thread, 1, local_variable_table[i].slot, long_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->SetLocalLong(thread, 1, local_variable_table[i].slot, long_value)))
                 return NSK_FALSE;
         } else if (strcmp(local_variable_table[i].name, "f") ==0) {
             NSK_DISPLAY0("Checking positive: GetLocalFloat\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalFloat, jvmti,
-                    thread, 1, local_variable_table[i].slot, &float_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->GetLocalFloat(thread, 1, local_variable_table[i].slot, &float_value)))
                 return NSK_FALSE;
 
             NSK_DISPLAY0("Checking positive: SetLocalFloat\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalFloat, jvmti,
-                    thread, 1, local_variable_table[i].slot, float_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->SetLocalFloat(thread, 1, local_variable_table[i].slot, float_value)))
                 return NSK_FALSE;
         } else if (strcmp(local_variable_table[i].name, "d") ==0) {
             NSK_DISPLAY0("Checking positive: GetLocalDouble\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalDouble, jvmti,
-                    thread, 1, local_variable_table[i].slot, &double_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->GetLocalDouble(thread, 1, local_variable_table[i].slot, &double_value)))
                 return NSK_FALSE;
 
             NSK_DISPLAY0("Checking positive: SetLocalDouble\n");
-            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalDouble, jvmti,
-                    thread, 1, local_variable_table[i].slot, double_value)))
+            if (!NSK_JVMTI_VERIFY(
+                    jvmti->SetLocalDouble(thread, 1, local_variable_table[i].slot, double_value)))
                 return NSK_FALSE;
         }
     }
 
 /* DEBUG -- while thread should be suspended
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
         return NSK_FALSE;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 */
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti,
-            (unsigned char*)local_variable_table)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)local_variable_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -424,18 +410,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -451,7 +436,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -464,7 +449,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -477,12 +462,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -496,7 +481,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -510,12 +495,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -529,12 +514,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -630,7 +615,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -642,13 +627,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -660,13 +645,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -678,10 +663,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -76,8 +76,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -89,8 +88,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -102,24 +100,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -133,21 +127,19 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking positive: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: SuspendThreadList\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: ResumeThreadList\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -163,27 +155,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -197,7 +185,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -210,7 +198,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -220,8 +208,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -265,43 +252,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -320,58 +309,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -386,18 +374,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -413,7 +400,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -426,7 +413,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -439,12 +426,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -458,7 +445,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -472,12 +459,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,12 +478,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -592,7 +579,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -604,13 +591,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -622,13 +609,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -640,10 +627,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -73,8 +73,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -86,8 +85,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -99,24 +97,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -130,23 +124,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -162,27 +154,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -196,7 +184,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -209,7 +197,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -219,8 +207,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -264,43 +251,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -319,58 +308,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -385,18 +373,16 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: GetLineNumberTable\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -412,7 +398,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -425,7 +411,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -438,12 +424,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -457,7 +443,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -471,12 +457,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -490,12 +476,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -591,7 +577,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -603,13 +589,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -621,13 +607,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -639,10 +625,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -130,7 +124,7 @@
 static int checkGetPotentialCapabilities() {
     jvmtiCapabilities caps;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return NSK_FALSE;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -148,7 +142,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -160,7 +154,7 @@
     jvmtiCapabilities caps;
 
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return NSK_FALSE;
     if (owe && !caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -182,7 +176,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -196,23 +190,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -228,27 +220,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -262,7 +250,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -275,7 +263,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -285,8 +273,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -330,43 +317,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -385,58 +374,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -451,18 +439,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -478,7 +465,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,7 +478,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -504,12 +491,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -523,15 +510,14 @@
 
     if (positive) {
         NSK_DISPLAY0("Checking positive: GetBytecodes\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, bytecodes)))
+        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(bytecodes)))
             return NSK_FALSE;
     } else {
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+                jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     }
 
@@ -546,12 +532,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -565,12 +551,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -76,8 +76,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -89,8 +88,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -102,24 +100,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -132,7 +126,7 @@
 static int checkGetPotentialCapabilities() {
     jvmtiCapabilities caps;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return NSK_FALSE;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -150,7 +144,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -162,7 +156,7 @@
     jvmtiCapabilities caps;
 
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return NSK_FALSE;
     if (owe && !caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -184,7 +178,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -198,23 +192,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -230,27 +222,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -264,7 +252,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -277,7 +265,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -287,8 +275,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -332,43 +319,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -387,58 +376,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -453,18 +441,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -480,7 +467,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -493,7 +480,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -506,23 +493,21 @@
 
     if (positive) {
         NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+        if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+        if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     } else {
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+                jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+                jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     }
 
@@ -537,7 +522,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -551,12 +536,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -570,12 +555,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -130,7 +124,7 @@
 static int checkGetPotentialCapabilities() {
     jvmtiCapabilities caps;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return NSK_FALSE;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -148,7 +142,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -160,7 +154,7 @@
     jvmtiCapabilities caps;
 
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return NSK_FALSE;
     if (owe && !caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -182,7 +176,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -196,23 +190,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -228,27 +220,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -262,7 +250,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -275,7 +263,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -285,8 +273,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -330,43 +317,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -385,58 +374,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -451,18 +439,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -478,7 +465,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,14 +478,12 @@
 
     if (positive) {
         NSK_DISPLAY0("Checking positive: GetObjectMonitorUsage\n");
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti,
-                thread, &monitor_info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     } else {
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti,
-                    thread, &monitor_info)))
+                jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     }
 
@@ -512,12 +497,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -531,7 +516,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -545,12 +530,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -564,12 +549,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -76,8 +76,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -89,8 +88,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -102,24 +100,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -132,7 +126,7 @@
 static int checkGetPotentialCapabilities() {
     jvmtiCapabilities caps;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return NSK_FALSE;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -150,7 +144,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -162,7 +156,7 @@
     jvmtiCapabilities caps;
 
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return NSK_FALSE;
     if (owe && !caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -184,7 +178,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -198,23 +192,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -230,37 +222,33 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     if (positive) {
         NSK_DISPLAY0("Checking positive: InterruptThread\n");
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+        if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(thread)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking positive: StopThread\n");
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(StopThread, jvmti,
-                thread, exception)))
+        if (!NSK_JVMTI_VERIFY(jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     } else {
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+                jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+                jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     }
 
@@ -275,7 +263,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -288,7 +276,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -298,8 +286,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -343,43 +330,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -398,58 +387,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -464,18 +452,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,7 +478,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -504,7 +491,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -517,12 +504,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -536,7 +523,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -550,12 +537,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -569,12 +556,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -78,8 +78,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -91,8 +90,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -104,24 +102,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -134,7 +128,7 @@
 static int checkGetPotentialCapabilities() {
     jvmtiCapabilities caps;
 
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return NSK_FALSE;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -152,7 +146,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -164,7 +158,7 @@
     jvmtiCapabilities caps;
 
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return NSK_FALSE;
     if (owe && !caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -186,7 +180,7 @@
 
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -201,41 +195,39 @@
 
     if (positive) {
         NSK_DISPLAY0("Checking positive: SuspendThread\n");
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+        if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking positive: ResumeThread\n");
-        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+        if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking positive: SuspendThreadList\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+        if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking positive: ResumeThreadList\n");
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+        if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     } else {
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+                jvmti->SuspendThread(thread)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+                jvmti->ResumeThread(thread)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+                jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
 
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-                NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+                jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     }
 
@@ -252,27 +244,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -286,7 +274,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -299,7 +287,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -309,8 +297,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -354,43 +341,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -409,58 +398,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -475,18 +463,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -502,7 +489,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -515,7 +502,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -528,12 +515,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -547,7 +534,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -561,12 +548,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -580,12 +567,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -73,8 +73,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -86,8 +85,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -99,24 +97,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -130,23 +124,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -162,27 +154,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -196,7 +184,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -209,7 +197,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -219,8 +207,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -264,43 +251,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -319,58 +308,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -385,18 +373,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_ABSENT_INFORMATION,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -412,7 +399,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -425,7 +412,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -438,12 +425,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -457,7 +444,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -471,12 +458,12 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+            jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -490,12 +477,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -591,7 +578,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -603,13 +590,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -621,13 +608,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -639,10 +626,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -131,23 +125,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -163,27 +155,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -197,7 +185,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -210,7 +198,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -220,8 +208,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -265,43 +252,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -320,58 +309,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
+            jvmti->SetLocalObject(thread, 0, 0, thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
+            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
+            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
+            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
+            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -386,18 +374,17 @@
 
     NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
+            jvmti->GetSourceFileName(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
+            jvmti->GetSourceDebugExtension(klass, &name)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
-                &line_number_table)))
+            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -413,7 +400,7 @@
     class_def.class_byte_count = 0;
     class_def.class_bytes = NULL;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
+            jvmti->RedefineClasses(1, &class_def)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -426,7 +413,7 @@
 
     NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
+            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -439,12 +426,12 @@
 
     NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
+            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
+            jvmti->IsMethodSynthetic(method, &is_synthetic)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -458,7 +445,7 @@
 
     NSK_DISPLAY0("Checking negative: GetBytecodes\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
+            jvmti->GetBytecodes(method, &count, &bytecodes)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -471,13 +458,11 @@
     jlong nanos;
 
     NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTimerInfo\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTime\n");
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTime(&nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -491,12 +476,12 @@
 
     NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
+            jvmti->GetThreadCpuTimerInfo(&info)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: checkGetThreadCpuTime\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
+            jvmti->GetThreadCpuTime(thread, &nanos)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -592,7 +577,7 @@
 
     /* testcase #1: check GetPotentialCapabilities */
     NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
@@ -604,13 +589,13 @@
     NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #3: check if GetCapabilities returns the capability */
     NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
@@ -622,13 +607,13 @@
     NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
         return JNI_ERR;
 
     /* testcase #5: check if GetCapabilities does not return the capability */
     NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
@@ -640,10 +625,10 @@
     NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
     memset(&caps, 0, sizeof(caps));
     caps.CAPABILITY = 1;
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
         return JNI_ERR;
     memset(&caps, 0, sizeof(caps));
-    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
     if (!caps.CAPABILITY) {
         NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp	Wed Oct 10 10:56:24 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp	Wed Oct 10 11:20:21 2018 -0700
@@ -74,8 +74,7 @@
     NSK_DISPLAY0("Prepare: find tested thread\n");
 
     /* get all live threads */
-    if (!NSK_JVMTI_VERIFY(
-           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
         return NSK_FALSE;
 
     if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
@@ -87,8 +86,7 @@
             return NSK_FALSE;
 
         /* get thread information */
-        if (!NSK_JVMTI_VERIFY(
-                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
+        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
             return NSK_FALSE;
 
         NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
@@ -100,24 +98,20 @@
     }
 
     /* deallocate threads list */
-    if (!NSK_JVMTI_VERIFY(
-            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
+    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
         return NSK_FALSE;
 
     /* get tested thread class */
-    if (!NSK_JNI_VERIFY(jni, (klass =
-            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
         return NSK_FALSE;
 
     /* get tested thread method 'run' */
-    if (!NSK_JNI_VERIFY(jni, (method =
-            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
         return NSK_FALSE;
 
     /* get tested thread field 'waitingMonitor' */
     if (!NSK_JNI_VERIFY(jni, (field =
-            NSK_CPP_STUB4(GetFieldID, jni, klass,
-                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
+            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -131,23 +125,21 @@
     jvmtiError err;
 
     NSK_DISPLAY0("Checking negative: SuspendThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
+            jvmti->SuspendThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
+            jvmti->ResumeThreadList(1, &thread, &err)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -163,27 +155,23 @@
     jmethodID ctor = NULL;
     jobject exception = NULL;
 
-    if (!NSK_JNI_VERIFY(jni, (cls =
-            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
         return NSK_FALSE;
 
     if (!NSK_JNI_VERIFY(jni, (ctor =
-            NSK_CPP_STUB4(GetMethodID, jni, cls,
-                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
+            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
         return NSK_FALSE;
 
-    if (!NSK_JNI_VERIFY(jni, (exception =
-            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
+    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: StopThread\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
+            jvmti->StopThread(thread, exception)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: InterruptThread\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -197,7 +185,7 @@
 
     NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
+            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -210,7 +198,7 @@
 
     NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
+            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -220,8 +208,7 @@
  */
 static int checkPopFrame() {
     NSK_DISPLAY0("Checking negative: PopFrame\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -265,43 +252,45 @@
 
     NSK_DISPLAY0("Checking negative: SetTag\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
+            jvmti->SetTag(thread, TAG_VALUE)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetTag\n");
-    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
+    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
     tag = TAG_VALUE;
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
-                &count, &res_objects, &res_tags)))
+            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
-                HeapObject, &dummy_user_data)))
+            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
-                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
+            jvmti->IterateOverInstancesOfClass(klass,
+                                               JVMTI_HEAP_OBJECT_UNTAGGED,
+                                               HeapObject,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
-                ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverObjectsReachableFromObject(thread,
+                                                         ObjectReference,
+                                                         &dummy_user_data)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
-                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
+            jvmti->IterateOverReachableObjects(HeapRoot,
+                                               StackReference,
+                                               ObjectReference,
+                                               &dummy_user_data)))
         return NSK_FALSE;
 
     return NSK_TRUE;
@@ -320,58 +309,57 @@
 
     NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
-                &local_variable_table)))
+            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalObject\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
+            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalInt\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
+            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalLong\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
+            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
+            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
         return NSK_FALSE;
 
     NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
     if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
-            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
+            jvmti->GetLocalDouble(thread, 0, 0, &