test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.cpp
changeset 57683 1cf884e437ea
parent 57629 7aba63ce3b3a
child 58679 9c3209ff7550
equal deleted inserted replaced
57681:41f2f2829a09 57683:1cf884e437ea
    41     if (strcmp(className,CLASS_NAME) == 0) {
    41     if (strcmp(className,CLASS_NAME) == 0) {
    42         int redefineNumber =0;
    42         int redefineNumber =0;
    43         char fileName[512];
    43         char fileName[512];
    44         nsk_jvmti_disableNotification(jvmti, JVMTI_EVENT_CLASS_LOAD, NULL);
    44         nsk_jvmti_disableNotification(jvmti, JVMTI_EVENT_CLASS_LOAD, NULL);
    45         nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char));
    45         nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char));
    46         if (nsk_jvmti_redefineClass(jvmti, klass, fileName) == NSK_TRUE) {
    46         if (nsk_jvmti_redefineClass(jvmti, klass, fileName)) {
    47             nsk_printf("\n Redefine successful ..\n");
    47             nsk_printf("\n Redefine successful ..\n");
    48         } else {
    48         } else {
    49             nsk_printf("\n Redefine failed..\n");
    49             nsk_printf("\n Redefine failed..\n");
    50         }
    50         }
    51     }
    51     }
    86         rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks));
    86         rc=jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks));
    87         if (rc != JVMTI_ERROR_NONE) {
    87         if (rc != JVMTI_ERROR_NONE) {
    88             nsk_printf(" Agent:: Error occured while setting event call back \n");
    88             nsk_printf(" Agent:: Error occured while setting event call back \n");
    89             return JNI_ERR;
    89             return JNI_ERR;
    90         }
    90         }
    91         if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) {
    91         if (nsk_jvmti_enableNotification(jvmti, JVMTI_EVENT_CLASS_PREPARE, NULL)) {
    92             nsk_printf(" Enabled. noftification..");
    92             nsk_printf(" Enabled. noftification..");
    93         } else {
    93         } else {
    94             nsk_printf(" Failed to Enable ..");
    94             nsk_printf(" Failed to Enable ..");
    95         }
    95         }
    96     }
    96     }