< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t002/gf08t002.cpp

Print this page
rev 52050 : [mq]: refactor


  53     return JNI_VERSION_1_8;
  54 }
  55 #endif
  56 jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
  57     jvmtiEnv *jvmti = NULL;
  58 
  59     /* init framework and parse options */
  60     if (!NSK_VERIFY(nsk_jvmti_parseOptions(options)))
  61         return JNI_ERR;
  62 
  63     timeout = nsk_jvmti_getWaitTime() * 60000;
  64 
  65     /* create JVMTI environment */
  66     if (!NSK_VERIFY((jvmti =
  67             nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
  68         return JNI_ERR;
  69 
  70     setVerboseMode = nsk_jvmti_findOptionStringValue("setVerboseMode", NULL);
  71 
  72     if (strcmp(setVerboseMode, "y") == 0 || strcmp(setVerboseMode, "yes") == 0) {
  73         if (!NSK_JVMTI_VERIFY(
  74                 NSK_CPP_STUB3(SetVerboseFlag, jvmti, JVMTI_VERBOSE_CLASS, JNI_TRUE))) {
  75             return JNI_ERR;
  76         } else {
  77             NSK_DISPLAY0("JVMTI_VERBOSE_CLASS mode has been set.\n");
  78         }
  79     }
  80 
  81     return JNI_OK;
  82 }
  83 
  84 /* ========================================================================== */
  85 
  86 }


  53     return JNI_VERSION_1_8;
  54 }
  55 #endif
  56 jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
  57     jvmtiEnv *jvmti = NULL;
  58 
  59     /* init framework and parse options */
  60     if (!NSK_VERIFY(nsk_jvmti_parseOptions(options)))
  61         return JNI_ERR;
  62 
  63     timeout = nsk_jvmti_getWaitTime() * 60000;
  64 
  65     /* create JVMTI environment */
  66     if (!NSK_VERIFY((jvmti =
  67             nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
  68         return JNI_ERR;
  69 
  70     setVerboseMode = nsk_jvmti_findOptionStringValue("setVerboseMode", NULL);
  71 
  72     if (strcmp(setVerboseMode, "y") == 0 || strcmp(setVerboseMode, "yes") == 0) {
  73         if (!NSK_JVMTI_VERIFY(jvmti->SetVerboseFlag(JVMTI_VERBOSE_CLASS, JNI_TRUE))) {

  74             return JNI_ERR;
  75         } else {
  76             NSK_DISPLAY0("JVMTI_VERBOSE_CLASS mode has been set.\n");
  77         }
  78     }
  79 
  80     return JNI_OK;
  81 }
  82 
  83 /* ========================================================================== */
  84 
  85 }
< prev index next >