--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/FramePop/framepop001/framepop001.cpp Tue Sep 11 09:42:27 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/FramePop/framepop001/framepop001.cpp Tue Sep 11 10:12:50 2018 -0700
@@ -28,21 +28,8 @@
#include "agent_common.h"
#include "JVMTITools.h"
-#ifdef __cplusplus
extern "C" {
-#endif
-
-#ifndef JNI_ENV_ARG
-#ifdef __cplusplus
-#define JNI_ENV_ARG(x, y) y
-#define JNI_ENV_PTR(x) x
-#else
-#define JNI_ENV_ARG(x,y) x, y
-#define JNI_ENV_PTR(x) (*x)
-#endif
-
-#endif
#define PASSED 0
#define STATUS_FAILED 2
@@ -188,8 +175,7 @@
printdump = JNI_TRUE;
}
- res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti),
- JVMTI_VERSION_1_1);
+ res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_1);
if (res != JNI_OK || jvmti == NULL) {
printf("Wrong result of a valid call to GetEnv!\n");
return JNI_ERR;
@@ -249,8 +235,7 @@
return result;
}
- mid = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, cls),
- "chain", "()V");
+ mid = env->GetStaticMethodID(cls, "chain", "()V");
if (mid == 0) {
printf("Cannot find Method ID for method chain\n");
return STATUS_FAILED;
@@ -276,20 +261,18 @@
result = STATUS_FAILED;
}
- clz = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env,
- "nsk/jvmti/FramePop/framepop001a"));
+ clz = env->FindClass("nsk/jvmti/FramePop/framepop001a");
if (clz == NULL) {
printf("Cannot find framepop001a class!\n");
result = STATUS_FAILED;
return STATUS_FAILED;
}
- mid = JNI_ENV_PTR(env)->GetStaticMethodID(JNI_ENV_ARG(env, clz),
- "dummy", "()V");
+ mid = env->GetStaticMethodID(clz, "dummy", "()V");
if (mid == 0) {
printf("Cannot find Method ID for method dummy\n");
return STATUS_FAILED;
}
- JNI_ENV_PTR(env)->CallStaticVoidMethod(JNI_ENV_ARG(env, clz), mid);
+ env->CallStaticVoidMethod(clz, mid);
if (eventsCount != eventsExpected) {
printf("Wrong number of frame pop events: %" PRIuPTR ", expected: %" PRIuPTR "\n",
@@ -300,6 +283,4 @@
return result;
}
-#ifdef __cplusplus
}
-#endif