src/os/solaris/vm/os_solaris.cpp

Print this page




1514 
1515   // allow PerfMemory to attempt cleanup of any persistent resources
1516   perfMemory_exit();
1517 
1518   // needs to remove object in file system
1519   AttachListener::abort();
1520 
1521   // flush buffered output, finish log files
1522   ostream_abort();
1523 
1524   // Check for abort hook
1525   abort_hook_t abort_hook = Arguments::abort_hook();
1526   if (abort_hook != NULL) {
1527     abort_hook();
1528   }
1529 }
1530 
1531 // Note: os::abort() might be called very early during initialization, or
1532 // called from signal handler. Before adding something to os::abort(), make
1533 // sure it is async-safe and can handle partially initialized VM.
1534 void os::abort(bool dump_core) {
1535   os::shutdown();
1536   if (dump_core) {
1537 #ifndef PRODUCT
1538     fdStream out(defaultStream::output_fd());
1539     out.print_raw("Current thread is ");
1540     char buf[16];
1541     jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1542     out.print_raw_cr(buf);
1543     out.print_raw_cr("Dumping core ...");
1544 #endif
1545     ::abort(); // dump core (for debugging)
1546   }
1547 
1548   ::exit(1);
1549 }
1550 
1551 // Die immediately, no exit hook, no abort hook, no cleanup.
1552 void os::die() {
1553   ::abort(); // dump core (for debugging)
1554 }




1514 
1515   // allow PerfMemory to attempt cleanup of any persistent resources
1516   perfMemory_exit();
1517 
1518   // needs to remove object in file system
1519   AttachListener::abort();
1520 
1521   // flush buffered output, finish log files
1522   ostream_abort();
1523 
1524   // Check for abort hook
1525   abort_hook_t abort_hook = Arguments::abort_hook();
1526   if (abort_hook != NULL) {
1527     abort_hook();
1528   }
1529 }
1530 
1531 // Note: os::abort() might be called very early during initialization, or
1532 // called from signal handler. Before adding something to os::abort(), make
1533 // sure it is async-safe and can handle partially initialized VM.
1534 void os::abort(bool dump_core, void* siginfo, void* context) {
1535   os::shutdown();
1536   if (dump_core) {
1537 #ifndef PRODUCT
1538     fdStream out(defaultStream::output_fd());
1539     out.print_raw("Current thread is ");
1540     char buf[16];
1541     jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1542     out.print_raw_cr(buf);
1543     out.print_raw_cr("Dumping core ...");
1544 #endif
1545     ::abort(); // dump core (for debugging)
1546   }
1547 
1548   ::exit(1);
1549 }
1550 
1551 // Die immediately, no exit hook, no abort hook, no cleanup.
1552 void os::die() {
1553   ::abort(); // dump core (for debugging)
1554 }