< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref005/followref005.cpp

Print this page
rev 52185 : 8212148: Remove remaining NSK_CPP_STUBs
Summary: Remove remaining macros
Reviewed-by: amenkov, phh

@@ -43,62 +43,46 @@
     jlong * pObjTags;
 
     printf(">>> Check that FollowReferences(), IterateThroughHeap(), GetTag(), SetTag() and GetObjectsWithTags() \n"
            "    return an error if env. doesn't possess can_tag_objects capability\n");
 
-    retCode = NSK_CPP_STUB6(FollowReferences,
-                              jvmti,
-                              (jint) 0,                 /* heap filter */
+    retCode = jvmti->FollowReferences((jint) 0,                 /* heap filter */
                               NULL,                     /* class */
                               NULL,                     /* inital object */
                               &g_wrongHeapCallbacks,
                               (const void *) &g_fakeUserData);
 
     if ( ! NSK_VERIFY(retCode == JVMTI_ERROR_MUST_POSSESS_CAPABILITY ) ) {
         NSK_COMPLAIN1("FollowReferences() returned %i", retCode);
         nsk_jvmti_setFailStatus();
     }
 
-    retCode = NSK_CPP_STUB5(IterateThroughHeap,
-                              jvmti,
-                              (jint) 0,                 /* heap filter */
+    retCode = jvmti->IterateThroughHeap((jint) 0,                 /* heap filter */
                               NULL,                     /* class */
                               &g_wrongHeapCallbacks,
                               (const void *) &g_fakeUserData);
 
     if ( ! NSK_VERIFY(retCode == JVMTI_ERROR_MUST_POSSESS_CAPABILITY ) ) {
         NSK_COMPLAIN1("IterateThroughHeap() returned %i", retCode);
         nsk_jvmti_setFailStatus();
     }
 
-    retCode = NSK_CPP_STUB3(GetTag,
-                              jvmti,
-                              (jobject) &g_wrongHeapCallbacks,
-                              &tag);
+    retCode = jvmti->GetTag((jobject) &g_wrongHeapCallbacks, &tag);
 
     if ( ! NSK_VERIFY(retCode == JVMTI_ERROR_MUST_POSSESS_CAPABILITY ) ) {
         NSK_COMPLAIN1("GetTag() returned %i", retCode);
         nsk_jvmti_setFailStatus();
     }
 
-    retCode = NSK_CPP_STUB3(SetTag,
-                              jvmti,
-                              (jobject) &g_wrongHeapCallbacks,
-                              tag);
+    retCode = jvmti->SetTag((jobject) &g_wrongHeapCallbacks, tag);
 
     if ( ! NSK_VERIFY(retCode == JVMTI_ERROR_MUST_POSSESS_CAPABILITY ) ) {
         NSK_COMPLAIN1("SetTag() returned %i", retCode);
         nsk_jvmti_setFailStatus();
     }
 
-    retCode = NSK_CPP_STUB6(GetObjectsWithTags,
-                              jvmti,
-                              1,
-                              &tag,
-                              &cnt,
-                              &pObjs,
-                              &pObjTags);
+    retCode = jvmti->GetObjectsWithTags(1, &tag, &cnt, &pObjs, &pObjTags);
 
     if ( ! NSK_VERIFY(retCode == JVMTI_ERROR_MUST_POSSESS_CAPABILITY ) ) {
         NSK_COMPLAIN1("GetObjectsWithTags() returned %i", retCode);
         nsk_jvmti_setFailStatus();
     }

@@ -146,11 +130,11 @@
     {
         jvmtiCapabilities caps;
 
         memset(&caps, 0, sizeof(caps));
         /* Don't add can_tag_objects capability */
-        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))) {
< prev index next >