< prev index next >

src/share/vm/gc/g1/vm_operations_g1.cpp

Print this page




 210   // with the SLT thread in order to acquire/release the PLL.
 211   SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
 212   if (slt != NULL) {
 213     slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
 214   } else {
 215     SurrogateLockerThread::report_missing_slt();
 216   }
 217 }
 218 
 219 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 220   assert(_needs_pll, "don't call this otherwise");
 221   // The caller may block while communicating
 222   // with the SLT thread in order to acquire/release the PLL.
 223   ConcurrentMarkThread::slt()->
 224     manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
 225 }
 226 
 227 void VM_CGC_Operation::doit() {
 228   TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
 229   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 230   GCTraceTime t(_printGCMessage, G1Log::fine(), true, g1h->gc_timer_cm(), g1h->concurrent_mark()->concurrent_gc_id());
 231   IsGCActiveMark x;
 232   _cl->do_void();
 233 }
 234 
 235 bool VM_CGC_Operation::doit_prologue() {
 236   // Note the relative order of the locks must match that in
 237   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 238   if (_needs_pll) {
 239     acquire_pending_list_lock();
 240   }
 241 
 242   Heap_lock->lock();
 243   return true;
 244 }
 245 
 246 void VM_CGC_Operation::doit_epilogue() {
 247   // Note the relative order of the unlocks must match that in
 248   // VM_GC_Operation::doit_epilogue()
 249   Heap_lock->unlock();
 250   if (_needs_pll) {


 210   // with the SLT thread in order to acquire/release the PLL.
 211   SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
 212   if (slt != NULL) {
 213     slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
 214   } else {
 215     SurrogateLockerThread::report_missing_slt();
 216   }
 217 }
 218 
 219 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 220   assert(_needs_pll, "don't call this otherwise");
 221   // The caller may block while communicating
 222   // with the SLT thread in order to acquire/release the PLL.
 223   ConcurrentMarkThread::slt()->
 224     manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
 225 }
 226 
 227 void VM_CGC_Operation::doit() {
 228   TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
 229   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 230   GCTraceTime t(_printGCMessage, G1Log::fine(), true, g1h->gc_timer_cm());
 231   IsGCActiveMark x;
 232   _cl->do_void();
 233 }
 234 
 235 bool VM_CGC_Operation::doit_prologue() {
 236   // Note the relative order of the locks must match that in
 237   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 238   if (_needs_pll) {
 239     acquire_pending_list_lock();
 240   }
 241 
 242   Heap_lock->lock();
 243   return true;
 244 }
 245 
 246 void VM_CGC_Operation::doit_epilogue() {
 247   // Note the relative order of the unlocks must match that in
 248   // VM_GC_Operation::doit_epilogue()
 249   Heap_lock->unlock();
 250   if (_needs_pll) {
< prev index next >