test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp
equal
deleted
inserted
replaced
96 |
96 |
97 threadClass = jni->FindClass(SEARCH_NAME); |
97 threadClass = jni->FindClass(SEARCH_NAME); |
98 nsk_printf(" %d..",redefineNumber); |
98 nsk_printf(" %d..",redefineNumber); |
99 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char)); |
99 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char)); |
100 |
100 |
101 if (nsk_jvmti_redefineClass(jvmti, threadClass,fileName) == NSK_TRUE) { |
101 if (nsk_jvmti_redefineClass(jvmti, threadClass,fileName)) { |
102 nsk_printf("Agent:: Redefined..\n"); |
102 nsk_printf("Agent:: Redefined..\n"); |
103 } else { |
103 } else { |
104 nsk_printf(" Failed to redefine..\n"); |
104 nsk_printf(" Failed to redefine..\n"); |
105 return; |
105 return; |
106 } |
106 } |
166 rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
166 rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
167 if (rc != JVMTI_ERROR_NONE) { |
167 if (rc != JVMTI_ERROR_NONE) { |
168 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
168 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
169 return JNI_ERR; |
169 return JNI_ERR; |
170 } |
170 } |
171 if ((nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_LOAD, |
171 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_LOAD, NULL) && |
172 NULL) == NSK_TRUE) && |
172 nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_BREAKPOINT, NULL)) { |
173 (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_BREAKPOINT, |
|
174 NULL) == NSK_TRUE)) { |
|
175 nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n"); |
173 nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n"); |
176 } else { |
174 } else { |
177 nsk_printf(" Error in Eanableing Notifications.."); |
175 nsk_printf(" Error in Eanableing Notifications.."); |
178 } |
176 } |
179 } |
177 } |