test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.cpp
equal
deleted
inserted
replaced
71 err= jvmti->SetBreakpoint(method, start); |
71 err= jvmti->SetBreakpoint(method, start); |
72 if (err != JVMTI_ERROR_NONE) { |
72 if (err != JVMTI_ERROR_NONE) { |
73 nsk_printf(" ## Error occured %s \n",TranslateError(err)); |
73 nsk_printf(" ## Error occured %s \n",TranslateError(err)); |
74 } else { |
74 } else { |
75 nsk_printf(" NO ERRORS "); |
75 nsk_printf(" NO ERRORS "); |
76 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_BREAKPOINT, NULL) == NSK_TRUE) { |
76 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_BREAKPOINT, NULL)) { |
77 nsk_printf(" Enabled.. notification event ..\n"); |
77 nsk_printf(" Enabled.. notification event ..\n"); |
78 } |
78 } |
79 } |
79 } |
80 } |
80 } |
81 } |
81 } |
114 jthread thread, |
114 jthread thread, |
115 jmethodID method, |
115 jmethodID method, |
116 jlocation location) { |
116 jlocation location) { |
117 jvmtiError err; |
117 jvmtiError err; |
118 err = JVMTI_ERROR_NONE; |
118 err = JVMTI_ERROR_NONE; |
119 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_SINGLE_STEP, NULL) == NSK_TRUE) { |
119 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_SINGLE_STEP, NULL)) { |
120 nsk_printf(" Enabled.. notification event .."); |
120 nsk_printf(" Enabled.. notification event .."); |
121 } |
121 } |
122 err= jvmti->SetEventNotificationMode(JVMTI_DISABLE, |
122 err= jvmti->SetEventNotificationMode(JVMTI_DISABLE, |
123 JVMTI_EVENT_BREAKPOINT, NULL); |
123 JVMTI_EVENT_BREAKPOINT, NULL); |
124 if (err == JVMTI_ERROR_NONE) { |
124 if (err == JVMTI_ERROR_NONE) { |
170 rc = jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
170 rc = jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
171 if (rc != JVMTI_ERROR_NONE) { |
171 if (rc != JVMTI_ERROR_NONE) { |
172 nsk_printf(" ## Error occured %s \n",TranslateError(rc)); |
172 nsk_printf(" ## Error occured %s \n",TranslateError(rc)); |
173 return JNI_ERR; |
173 return JNI_ERR; |
174 } |
174 } |
175 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) { |
175 if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL)) { |
176 nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n"); |
176 nsk_printf("Agent :: NOTIFICATIONS ARE ENABLED \n"); |
177 } else { |
177 } else { |
178 nsk_printf(" Error in Eanableing Notifications.."); |
178 nsk_printf(" Error in Eanableing Notifications.."); |
179 } |
179 } |
180 } |
180 } |