< prev index next >

src/hotspot/share/runtime/threadSMR.cpp

Print this page
rev 52283 : [mq]: 8212933


 972     if (EnableThreadSMRStatistics) {
 973       _delete_lock_wait_cnt++;
 974       if (_delete_lock_wait_cnt > _delete_lock_wait_max) {
 975         _delete_lock_wait_max = _delete_lock_wait_cnt;
 976       }
 977     }
 978     // Wait for a release_stable_list() call before we check again. No
 979     // safepoint check, no timeout, and not as suspend equivalent flag
 980     // because this JavaThread is not on the Threads list.
 981     ThreadsSMRSupport::delete_lock()->wait(Mutex::_no_safepoint_check_flag, 0,
 982                                      !Mutex::_as_suspend_equivalent_flag);
 983     if (EnableThreadSMRStatistics) {
 984       _delete_lock_wait_cnt--;
 985     }
 986 
 987     ThreadsSMRSupport::clear_delete_notify();
 988     ThreadsSMRSupport::delete_lock()->unlock();
 989     // Retry the whole scenario.
 990   }
 991 
 992   if (ThreadLocalHandshakes) {
 993     // The thread is about to be deleted so cancel any handshake.
 994     thread->cancel_handshake();
 995   }
 996 
 997   delete thread;
 998   if (EnableThreadSMRStatistics) {
 999     timer.stop();
1000     uint millis = (uint)timer.milliseconds();
1001     ThreadsSMRSupport::inc_deleted_thread_cnt();
1002     ThreadsSMRSupport::add_deleted_thread_times(millis);
1003     ThreadsSMRSupport::update_deleted_thread_time_max(millis);
1004   }
1005 
1006   log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::smr_delete: thread=" INTPTR_FORMAT " is deleted.", os::current_thread_id(), p2i(thread));
1007 }
1008 
1009 // Apply the closure to all threads in the system, with a snapshot of
1010 // all JavaThreads provided by the list parameter.
1011 void ThreadsSMRSupport::threads_do(ThreadClosure *tc, ThreadsList *list) {
1012   list->threads_do(tc);
1013   Threads::non_java_threads_do(tc);
1014 }
1015 
1016 // Apply the closure to all threads in the system.




 972     if (EnableThreadSMRStatistics) {
 973       _delete_lock_wait_cnt++;
 974       if (_delete_lock_wait_cnt > _delete_lock_wait_max) {
 975         _delete_lock_wait_max = _delete_lock_wait_cnt;
 976       }
 977     }
 978     // Wait for a release_stable_list() call before we check again. No
 979     // safepoint check, no timeout, and not as suspend equivalent flag
 980     // because this JavaThread is not on the Threads list.
 981     ThreadsSMRSupport::delete_lock()->wait(Mutex::_no_safepoint_check_flag, 0,
 982                                      !Mutex::_as_suspend_equivalent_flag);
 983     if (EnableThreadSMRStatistics) {
 984       _delete_lock_wait_cnt--;
 985     }
 986 
 987     ThreadsSMRSupport::clear_delete_notify();
 988     ThreadsSMRSupport::delete_lock()->unlock();
 989     // Retry the whole scenario.
 990   }
 991 





 992   delete thread;
 993   if (EnableThreadSMRStatistics) {
 994     timer.stop();
 995     uint millis = (uint)timer.milliseconds();
 996     ThreadsSMRSupport::inc_deleted_thread_cnt();
 997     ThreadsSMRSupport::add_deleted_thread_times(millis);
 998     ThreadsSMRSupport::update_deleted_thread_time_max(millis);
 999   }
1000 
1001   log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::smr_delete: thread=" INTPTR_FORMAT " is deleted.", os::current_thread_id(), p2i(thread));
1002 }
1003 
1004 // Apply the closure to all threads in the system, with a snapshot of
1005 // all JavaThreads provided by the list parameter.
1006 void ThreadsSMRSupport::threads_do(ThreadClosure *tc, ThreadsList *list) {
1007   list->threads_do(tc);
1008   Threads::non_java_threads_do(tc);
1009 }
1010 
1011 // Apply the closure to all threads in the system.


< prev index next >