test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.cpp
equal
deleted
inserted
replaced
43 if (strcmp(className,CLASS_NAME) == 0) { |
43 if (strcmp(className,CLASS_NAME) == 0) { |
44 char fileName[512]; |
44 char fileName[512]; |
45 nsk_jvmti_disableNotification(jvmti_env, JVMTI_EVENT_CLASS_PREPARE, NULL); |
45 nsk_jvmti_disableNotification(jvmti_env, JVMTI_EVENT_CLASS_PREPARE, NULL); |
46 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, |
46 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, |
47 sizeof(fileName)/sizeof(char)); |
47 sizeof(fileName)/sizeof(char)); |
48 if (nsk_jvmti_redefineClass(jvmti_env, klass,fileName) == NSK_TRUE) { |
48 if (nsk_jvmti_redefineClass(jvmti_env, klass,fileName)) { |
49 nsk_printf("Redefine successful ..\n"); |
49 nsk_printf("Redefine successful ..\n"); |
50 } else { |
50 } else { |
51 nsk_printf("# error :: Redefine failed..\n"); |
51 nsk_printf("# error :: Redefine failed..\n"); |
52 } |
52 } |
53 } |
53 } |
88 rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
88 rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)); |
89 if (rc != JVMTI_ERROR_NONE) { |
89 if (rc != JVMTI_ERROR_NONE) { |
90 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
90 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
91 return JNI_ERR; |
91 return JNI_ERR; |
92 } |
92 } |
93 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) { |
93 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL)) { |
94 nsk_printf(" Enabled. noftification.."); |
94 nsk_printf(" Enabled. noftification.."); |
95 } else { |
95 } else { |
96 nsk_printf(" Failed to Enable .."); |
96 nsk_printf(" Failed to Enable .."); |
97 } |
97 } |
98 } |
98 } |