< prev index next >
src/hotspot/share/runtime/safepoint.cpp
Print this page
*** 101,111 ****
assert( _state == _not_synchronized, "trying to safepoint synchronize with wrong state");
int nof_threads = Threads::number_of_threads();
! log_debug(safepoint)("Safepoint synchronization initiated. (%d)", nof_threads);
RuntimeService::record_safepoint_begin();
MutexLocker mu(Safepoint_lock);
--- 101,111 ----
assert( _state == _not_synchronized, "trying to safepoint synchronize with wrong state");
int nof_threads = Threads::number_of_threads();
! log_debug(safepoint)("Safepoint synchronization initiated. (%d threads)", nof_threads);
RuntimeService::record_safepoint_begin();
MutexLocker mu(Safepoint_lock);
*** 405,417 ****
#endif // ASSERT
// Update the count of active JNI critical regions
GCLocker::set_jni_lock_count(_current_jni_active_count);
! if (log_is_enabled(Debug, safepoint)) {
! log_debug(safepoint)("Entering safepoint region: %s", VMThread::vm_safepoint_description());
! }
RuntimeService::record_safepoint_synchronized();
if (PrintSafepointStatistics) {
update_statistics_on_sync_end(os::javaTimeNanos());
}
--- 405,415 ----
#endif // ASSERT
// Update the count of active JNI critical regions
GCLocker::set_jni_lock_count(_current_jni_active_count);
! log_info(safepoint)("Entering safepoint region: %s", VMThread::vm_safepoint_description());
RuntimeService::record_safepoint_synchronized();
if (PrintSafepointStatistics) {
update_statistics_on_sync_end(os::javaTimeNanos());
}
*** 494,511 ****
for (; JavaThread *current = jtiwh.next(); ) {
ThreadSafepointState* cur_state = current->safepoint_state();
cur_state->restart(); // TSS _running
SafepointMechanism::disarm_local_poll(current); // release store, local state -> polling page
}
! log_debug(safepoint)("Leaving safepoint region");
} else {
// Set to not synchronized, so the threads will not go into the signal_thread_blocked method
// when they get restarted.
_state = _not_synchronized;
OrderAccess::fence();
! log_debug(safepoint)("Leaving safepoint region");
// Start suspended threads
jtiwh.rewind();
for (; JavaThread *current = jtiwh.next(); ) {
// A problem occurring on Solaris is when attempting to restart threads
--- 492,509 ----
for (; JavaThread *current = jtiwh.next(); ) {
ThreadSafepointState* cur_state = current->safepoint_state();
cur_state->restart(); // TSS _running
SafepointMechanism::disarm_local_poll(current); // release store, local state -> polling page
}
! log_info(safepoint)("Leaving safepoint region");
} else {
// Set to not synchronized, so the threads will not go into the signal_thread_blocked method
// when they get restarted.
_state = _not_synchronized;
OrderAccess::fence();
! log_info(safepoint)("Leaving safepoint region");
// Start suspended threads
jtiwh.rewind();
for (; JavaThread *current = jtiwh.next(); ) {
// A problem occurring on Solaris is when attempting to restart threads
< prev index next >