< prev index next >

src/share/vm/gc/cms/vmCMSOperations.cpp

Print this page
rev 11747 : [mq]: per.hotspot.patch

*** 35,52 **** #include "utilities/dtrace.hpp" ////////////////////////////////////////////////////////// // Methods in abstract class VM_CMS_Operation ////////////////////////////////////////////////////////// - void VM_CMS_Operation::acquire_pending_list_lock() { - _pending_list_locker.lock(); - } - - void VM_CMS_Operation::release_and_notify_pending_list_lock() { - _pending_list_locker.unlock(); - } - void VM_CMS_Operation::verify_before_gc() { if (VerifyBeforeGC && GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) { GCTraceTime(Info, gc, phases, verify) tm("Verify Before", _collector->_gc_timer_cm); HandleMark hm; --- 35,44 ----
*** 83,103 **** assert(Thread::current()->is_ConcurrentGC_thread(), "just checking"); assert(!CMSCollector::foregroundGCShouldWait(), "Possible deadlock"); assert(!ConcurrentMarkSweepThread::cms_thread_has_cms_token(), "Possible deadlock"); - if (needs_pending_list_lock()) { - acquire_pending_list_lock(); - } - // Get the Heap_lock after the pending_list_lock. Heap_lock->lock(); if (lost_race()) { assert(_prologue_succeeded == false, "Initialized in c'tor"); Heap_lock->unlock(); - if (needs_pending_list_lock()) { - release_and_notify_pending_list_lock(); - } } else { _prologue_succeeded = true; } return _prologue_succeeded; } --- 75,88 ----
*** 106,120 **** assert(Thread::current()->is_ConcurrentGC_thread(), "just checking"); assert(!CMSCollector::foregroundGCShouldWait(), "Possible deadlock"); assert(!ConcurrentMarkSweepThread::cms_thread_has_cms_token(), "Possible deadlock"); ! // Release the Heap_lock first. ! Heap_lock->unlock(); ! if (needs_pending_list_lock()) { ! release_and_notify_pending_list_lock(); } } ////////////////////////////////////////////////////////// // Methods in class VM_CMS_Initial_Mark ////////////////////////////////////////////////////////// --- 91,104 ---- assert(Thread::current()->is_ConcurrentGC_thread(), "just checking"); assert(!CMSCollector::foregroundGCShouldWait(), "Possible deadlock"); assert(!ConcurrentMarkSweepThread::cms_thread_has_cms_token(), "Possible deadlock"); ! if (Universe::has_reference_pending_list()) { ! Heap_lock->notify_all(); } + Heap_lock->unlock(); } ////////////////////////////////////////////////////////// // Methods in class VM_CMS_Initial_Mark //////////////////////////////////////////////////////////
*** 228,240 **** void VM_GenCollectFullConcurrent::doit_epilogue() { Thread* thr = Thread::current(); assert(thr->is_Java_thread(), "just checking"); JavaThread* jt = (JavaThread*)thr; ! // Release the Heap_lock first. Heap_lock->unlock(); - release_and_notify_pending_list_lock(); // It is fine to test whether completed collections has // exceeded our request count without locking because // the completion count is monotonically increasing; // this will break for very long-running apps when the --- 212,226 ---- void VM_GenCollectFullConcurrent::doit_epilogue() { Thread* thr = Thread::current(); assert(thr->is_Java_thread(), "just checking"); JavaThread* jt = (JavaThread*)thr; ! ! if (Universe::has_reference_pending_list()) { ! Heap_lock->notify_all(); ! } Heap_lock->unlock(); // It is fine to test whether completed collections has // exceeded our request count without locking because // the completion count is monotonically increasing; // this will break for very long-running apps when the
< prev index next >