src/share/vm/runtime/safepoint.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/safepoint.cpp Wed Jan 15 01:42:51 2014
--- new/src/share/vm/runtime/safepoint.cpp Wed Jan 15 01:42:51 2014
*** 154,164 ****
--- 154,164 ----
// Begin the process of bringing the system to a safepoint.
// Java threads can be in several different states and are
// stopped by different mechanisms:
//
// 1. Running interpreted
! // The interpeter dispatch table is changed to force it to
! // The interpreter dispatch table is changed to force it to
// check for a safepoint condition between bytecodes.
// 2. Running in native code
// When returning from the native code, a Java thread must check
// the safepoint _state to see if we must block. If the
// VM thread sees a Java thread in native, it does
*** 280,290 ****
--- 280,290 ----
// Sleep(0) will _not yield to lower priority threads, while SwitchThreadTo() will.
//
// See the comments in synchronizer.cpp for additional remarks on spinning.
//
// In the future we might:
! // 1. Modify the safepoint scheme to avoid potentally unbounded spinning.
! // 1. Modify the safepoint scheme to avoid potentially unbounded spinning.
// This is tricky as the path used by a thread exiting the JVM (say on
// on JNI call-out) simply stores into its state field. The burden
// is placed on the VM thread, which must poll (spin).
// 2. Find something useful to do while spinning. If the safepoint is GC-related
// we might aggressively scan the stacks of threads that are already safe.
*** 487,497 ****
--- 487,497 ----
ConcurrentMarkSweepThread::desynchronize(false);
} else if (UseG1GC) {
ConcurrentGCThread::safepoint_desynchronize();
}
#endif // INCLUDE_ALL_GCS
! // record this time so VMThread can keep track how much time has elasped
! // record this time so VMThread can keep track how much time has elapsed
// since last safepoint.
_end_of_last_safepoint = os::javaTimeMillis();
}
bool SafepointSynchronize::is_cleanup_needed() {
*** 824,834 ****
--- 824,834 ----
void SafepointSynchronize::print_safepoint_timeout(SafepointTimeoutReason reason) {
if (!timeout_error_printed) {
timeout_error_printed = true;
- // Print out the thread infor which didn't reach the safepoint for debugging
// purposes (useful when there are lots of threads in the debugger).
tty->print_cr("");
tty->print_cr("# SafepointSynchronize::begin: Timeout detected:");
if (reason == _spinning_timeout) {
tty->print_cr("# SafepointSynchronize::begin: Timed out while spinning to reach a safepoint.");
*** 1091,1101 ****
--- 1091,1101 ----
RegisterMap map(thread(), true);
frame caller_fr = stub_fr.sender(&map);
if (caller_fr.is_deoptimized_frame()) {
// The exception patch will destroy registers that are still
// live and will be needed during deoptimization. Defer the
! // Async exception should have defered the exception until the
! // Async exception should have deferred the exception until the
// next safepoint which will be detected when we get into
// the interpreter so if we have an exception now things
// are messed up.
fatal("Exception installed and deoptimization is pending");
src/share/vm/runtime/safepoint.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File