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