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