592 593 void vm_shutdown() 594 { 595 vm_perform_shutdown_actions(); 596 os::wait_for_keypress_at_exit(); 597 os::shutdown(); 598 } 599 600 void vm_abort(bool dump_core) { 601 vm_perform_shutdown_actions(); 602 os::wait_for_keypress_at_exit(); 603 604 // Flush stdout and stderr before abort. 605 fflush(stdout); 606 fflush(stderr); 607 608 os::abort(dump_core); 609 ShouldNotReachHere(); 610 } 611 612 void vm_notify_during_shutdown(const char* error, const char* message) { 613 if (error != NULL) { 614 tty->print_cr("Error occurred during initialization of VM"); 615 tty->print("%s", error); 616 if (message != NULL) { 617 tty->print_cr(": %s", message); 618 } 619 else { 620 tty->cr(); 621 } 622 } 623 if (ShowMessageBoxOnError && WizardMode) { 624 fatal("Error occurred during initialization of VM"); 625 } 626 } 627 628 void vm_exit_during_initialization() { 629 vm_notify_during_shutdown(NULL, NULL); 630 631 // Failure during initialization, we don't want to dump core | 592 593 void vm_shutdown() 594 { 595 vm_perform_shutdown_actions(); 596 os::wait_for_keypress_at_exit(); 597 os::shutdown(); 598 } 599 600 void vm_abort(bool dump_core) { 601 vm_perform_shutdown_actions(); 602 os::wait_for_keypress_at_exit(); 603 604 // Flush stdout and stderr before abort. 605 fflush(stdout); 606 fflush(stderr); 607 608 os::abort(dump_core); 609 ShouldNotReachHere(); 610 } 611 612 void vm_notify_during_cds_dumping(const char* error, const char* message) { 613 if (error != NULL) { 614 tty->print_cr("Error occurred during CDS dumping"); 615 tty->print("%s", error); 616 if (message != NULL) { 617 tty->print_cr(": %s", message); 618 } 619 else { 620 tty->cr(); 621 } 622 } 623 } 624 625 void vm_exit_during_cds_dumping(const char* error, const char* message) { 626 vm_notify_during_cds_dumping(error, message); 627 628 // Failure during CDS dumping, we don't want to dump core 629 vm_abort(false); 630 } 631 632 void vm_notify_during_shutdown(const char* error, const char* message) { 633 if (error != NULL) { 634 tty->print_cr("Error occurred during initialization of VM"); 635 tty->print("%s", error); 636 if (message != NULL) { 637 tty->print_cr(": %s", message); 638 } 639 else { 640 tty->cr(); 641 } 642 } 643 if (ShowMessageBoxOnError && WizardMode) { 644 fatal("Error occurred during initialization of VM"); 645 } 646 } 647 648 void vm_exit_during_initialization() { 649 vm_notify_during_shutdown(NULL, NULL); 650 651 // Failure during initialization, we don't want to dump core |