1472 // allow PerfMemory to attempt cleanup of any persistent resources
1473 perfMemory_exit();
1474
1475 // needs to remove object in file system
1476 AttachListener::abort();
1477
1478 // flush buffered output, finish log files
1479 ostream_abort();
1480
1481 // Check for abort hook
1482 abort_hook_t abort_hook = Arguments::abort_hook();
1483 if (abort_hook != NULL) {
1484 abort_hook();
1485 }
1486
1487 }
1488
1489 // Note: os::abort() might be called very early during initialization, or
1490 // called from signal handler. Before adding something to os::abort(), make
1491 // sure it is async-safe and can handle partially initialized VM.
1492 void os::abort(bool dump_core) {
1493 os::shutdown();
1494 if (dump_core) {
1495 #ifndef PRODUCT
1496 fdStream out(defaultStream::output_fd());
1497 out.print_raw("Current thread is ");
1498 char buf[16];
1499 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1500 out.print_raw_cr(buf);
1501 out.print_raw_cr("Dumping core ...");
1502 #endif
1503 ::abort(); // dump core
1504 }
1505
1506 ::exit(1);
1507 }
1508
1509 // Die immediately, no exit hook, no abort hook, no cleanup.
1510 void os::die() {
1511 // _exit() on LinuxThreads only kills current thread
1512 ::abort();
|
1472 // allow PerfMemory to attempt cleanup of any persistent resources
1473 perfMemory_exit();
1474
1475 // needs to remove object in file system
1476 AttachListener::abort();
1477
1478 // flush buffered output, finish log files
1479 ostream_abort();
1480
1481 // Check for abort hook
1482 abort_hook_t abort_hook = Arguments::abort_hook();
1483 if (abort_hook != NULL) {
1484 abort_hook();
1485 }
1486
1487 }
1488
1489 // Note: os::abort() might be called very early during initialization, or
1490 // called from signal handler. Before adding something to os::abort(), make
1491 // sure it is async-safe and can handle partially initialized VM.
1492 void os::abort(bool dump_core, void* siginfo, void* context) {
1493 os::shutdown();
1494 if (dump_core) {
1495 #ifndef PRODUCT
1496 fdStream out(defaultStream::output_fd());
1497 out.print_raw("Current thread is ");
1498 char buf[16];
1499 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1500 out.print_raw_cr(buf);
1501 out.print_raw_cr("Dumping core ...");
1502 #endif
1503 ::abort(); // dump core
1504 }
1505
1506 ::exit(1);
1507 }
1508
1509 // Die immediately, no exit hook, no abort hook, no cleanup.
1510 void os::die() {
1511 // _exit() on LinuxThreads only kills current thread
1512 ::abort();
|