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