test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.cpp
equal
deleted
inserted
replaced
44 char fileName[512]; |
44 char fileName[512]; |
45 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, |
45 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, |
46 fileName, sizeof(fileName)/sizeof(char)); |
46 fileName, sizeof(fileName)/sizeof(char)); |
47 nsk_jvmti_disableNotification(jvmti_env, |
47 nsk_jvmti_disableNotification(jvmti_env, |
48 JVMTI_EVENT_CLASS_LOAD, NULL); |
48 JVMTI_EVENT_CLASS_LOAD, NULL); |
49 if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName) == NSK_TRUE) { |
49 if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName)) { |
50 nsk_printf("\n Redefine successful.\n"); |
50 nsk_printf("\n Redefine successful.\n"); |
51 } else { |
51 } else { |
52 nsk_printf("\n Redefine failed.\n"); |
52 nsk_printf("\n Redefine failed.\n"); |
53 } |
53 } |
54 } |
54 } |
90 eventCallbacks.ClassPrepare = &callbackClassPrepare; |
90 eventCallbacks.ClassPrepare = &callbackClassPrepare; |
91 if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { |
91 if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { |
92 nsk_printf(" Agent:: Error occured while setting event call back.\n"); |
92 nsk_printf(" Agent:: Error occured while setting event call back.\n"); |
93 return JNI_ERR; |
93 return JNI_ERR; |
94 } |
94 } |
95 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) { |
95 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL)) { |
96 nsk_printf(" Agent:: Enabled notification.\n"); |
96 nsk_printf(" Agent:: Enabled notification.\n"); |
97 } else { |
97 } else { |
98 nsk_printf(" Agent:: Failed to enable notification.\n"); |
98 nsk_printf(" Agent:: Failed to enable notification.\n"); |
99 } |
99 } |
100 } |
100 } |