1128 // allow PerfMemory to attempt cleanup of any persistent resources
1129 perfMemory_exit();
1130
1131 // needs to remove object in file system
1132 AttachListener::abort();
1133
1134 // flush buffered output, finish log files
1135 ostream_abort();
1136
1137 // Check for abort hook
1138 abort_hook_t abort_hook = Arguments::abort_hook();
1139 if (abort_hook != NULL) {
1140 abort_hook();
1141 }
1142
1143 }
1144
1145 // Note: os::abort() might be called very early during initialization, or
1146 // called from signal handler. Before adding something to os::abort(), make
1147 // sure it is async-safe and can handle partially initialized VM.
1148 void os::abort(bool dump_core) {
1149 os::shutdown();
1150 if (dump_core) {
1151 #ifndef PRODUCT
1152 fdStream out(defaultStream::output_fd());
1153 out.print_raw("Current thread is ");
1154 char buf[16];
1155 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1156 out.print_raw_cr(buf);
1157 out.print_raw_cr("Dumping core ...");
1158 #endif
1159 ::abort(); // dump core
1160 }
1161
1162 ::exit(1);
1163 }
1164
1165 // Die immediately, no exit hook, no abort hook, no cleanup.
1166 void os::die() {
1167 // _exit() on BsdThreads only kills current thread
1168 ::abort();
|
1128 // allow PerfMemory to attempt cleanup of any persistent resources
1129 perfMemory_exit();
1130
1131 // needs to remove object in file system
1132 AttachListener::abort();
1133
1134 // flush buffered output, finish log files
1135 ostream_abort();
1136
1137 // Check for abort hook
1138 abort_hook_t abort_hook = Arguments::abort_hook();
1139 if (abort_hook != NULL) {
1140 abort_hook();
1141 }
1142
1143 }
1144
1145 // Note: os::abort() might be called very early during initialization, or
1146 // called from signal handler. Before adding something to os::abort(), make
1147 // sure it is async-safe and can handle partially initialized VM.
1148 void os::abort(bool dump_core, void* exceptionRecord, void* contextRecord) {
1149 os::shutdown();
1150 if (dump_core) {
1151 #ifndef PRODUCT
1152 fdStream out(defaultStream::output_fd());
1153 out.print_raw("Current thread is ");
1154 char buf[16];
1155 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
1156 out.print_raw_cr(buf);
1157 out.print_raw_cr("Dumping core ...");
1158 #endif
1159 ::abort(); // dump core
1160 }
1161
1162 ::exit(1);
1163 }
1164
1165 // Die immediately, no exit hook, no abort hook, no cleanup.
1166 void os::die() {
1167 // _exit() on BsdThreads only kills current thread
1168 ::abort();
|