test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.cpp
equal
deleted
inserted
replaced
42 jvmti_env->GetClassSignature(klass, &className, &generic); |
42 jvmti_env->GetClassSignature(klass, &className, &generic); |
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, sizeof(fileName)/sizeof(char)); |
46 nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, 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("Redefine failed .. \n"); |
50 nsk_printf("Redefine failed .. \n"); |
51 } |
51 } |
52 } |
52 } |
92 |
92 |
93 if (rc != JVMTI_ERROR_NONE) { |
93 if (rc != JVMTI_ERROR_NONE) { |
94 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
94 nsk_printf(" Agent:: Error occured while setting event call back \n"); |
95 return JNI_ERR; |
95 return JNI_ERR; |
96 } |
96 } |
97 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, |
97 if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL)) { |
98 NULL) == NSK_TRUE) { |
|
99 nsk_printf(" Enabled. noftification.."); |
98 nsk_printf(" Enabled. noftification.."); |
100 } else { |
99 } else { |
101 nsk_printf(" Failed to Enable .."); |
100 nsk_printf(" Failed to Enable .."); |
102 } |
101 } |
103 } |
102 } |