equal
deleted
inserted
replaced
99 #include "utilities/defaultStream.hpp" |
99 #include "utilities/defaultStream.hpp" |
100 #include "utilities/dtrace.hpp" |
100 #include "utilities/dtrace.hpp" |
101 #include "utilities/events.hpp" |
101 #include "utilities/events.hpp" |
102 #include "utilities/macros.hpp" |
102 #include "utilities/macros.hpp" |
103 #include "utilities/preserveException.hpp" |
103 #include "utilities/preserveException.hpp" |
|
104 #include "utilities/vmError.hpp" |
104 #if INCLUDE_ALL_GCS |
105 #if INCLUDE_ALL_GCS |
105 #include "gc/cms/concurrentMarkSweepThread.hpp" |
106 #include "gc/cms/concurrentMarkSweepThread.hpp" |
106 #include "gc/g1/concurrentMarkThread.inline.hpp" |
107 #include "gc/g1/concurrentMarkThread.inline.hpp" |
107 #include "gc/parallel/pcTasks.hpp" |
108 #include "gc/parallel/pcTasks.hpp" |
108 #endif // INCLUDE_ALL_GCS |
109 #endif // INCLUDE_ALL_GCS |
1286 |
1287 |
1287 // Calculate how long it'll be until the next PeriodicTask work |
1288 // Calculate how long it'll be until the next PeriodicTask work |
1288 // should be done, and sleep that amount of time. |
1289 // should be done, and sleep that amount of time. |
1289 int time_waited = sleep(); |
1290 int time_waited = sleep(); |
1290 |
1291 |
1291 if (is_error_reported()) { |
1292 if (VMError::is_error_reported()) { |
1292 // A fatal error has happened, the error handler(VMError::report_and_die) |
1293 // A fatal error has happened, the error handler(VMError::report_and_die) |
1293 // should abort JVM after creating an error log file. However in some |
1294 // should abort JVM after creating an error log file. However in some |
1294 // rare cases, the error handler itself might deadlock. Here periodically |
1295 // rare cases, the error handler itself might deadlock. Here periodically |
1295 // check for error reporting timeouts, and if it happens, just proceed to |
1296 // check for error reporting timeouts, and if it happens, just proceed to |
1296 // abort the VM. |
1297 // abort the VM. |
4146 Threads_lock->wait(!Mutex::_no_safepoint_check_flag, 0, |
4147 Threads_lock->wait(!Mutex::_no_safepoint_check_flag, 0, |
4147 Mutex::_as_suspend_equivalent_flag); |
4148 Mutex::_as_suspend_equivalent_flag); |
4148 } |
4149 } |
4149 |
4150 |
4150 // Hang forever on exit if we are reporting an error. |
4151 // Hang forever on exit if we are reporting an error. |
4151 if (ShowMessageBoxOnError && is_error_reported()) { |
4152 if (ShowMessageBoxOnError && VMError::is_error_reported()) { |
4152 os::infinite_sleep(); |
4153 os::infinite_sleep(); |
4153 } |
4154 } |
4154 os::wait_for_keypress_at_exit(); |
4155 os::wait_for_keypress_at_exit(); |
4155 |
4156 |
4156 // run Java level shutdown hooks |
4157 // run Java level shutdown hooks |