comparison src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @ 4022:db89aa49298f

7099824: G1: we should take the pending list lock before doing the remark pause Summary: Acquire the pending list lock in the prologue method of G1's concurrent VM_Operation and release the lock in the epilogue() method. The locking/unlocking order of the pending list lock and the Heap_lock should match that in the prologue and epilogue methods of VM_GC_Operation. Reviewed-by: tonyp, ysr
author johnc
date Thu, 20 Oct 2011 12:06:20 -0700
parents 2a241e764894
children da91efe96a93
comparison
equal deleted inserted replaced
4021:8d161913dfc3 4022:db89aa49298f
222 222
223 void SurrogateLockerThread::manipulatePLL(SLT_msg_type msg) { 223 void SurrogateLockerThread::manipulatePLL(SLT_msg_type msg) {
224 MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag); 224 MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag);
225 assert(_buffer == empty, "Should be empty"); 225 assert(_buffer == empty, "Should be empty");
226 assert(msg != empty, "empty message"); 226 assert(msg != empty, "empty message");
227 assert(!Heap_lock->owned_by_self(), "Heap_lock owned by requesting thread");
228
227 _buffer = msg; 229 _buffer = msg;
228 while (_buffer != empty) { 230 while (_buffer != empty) {
229 _monitor.notify(); 231 _monitor.notify();
230 _monitor.wait(Mutex::_no_safepoint_check_flag); 232 _monitor.wait(Mutex::_no_safepoint_check_flag);
231 } 233 }