< prev index next >

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

Print this page




 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   GCIdMark gc_id_mark(_gc_id);
 229   GCTraceCPUTime tcpu;
 230   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 231   GCTraceTime(Info, gc) t(_printGCMessage, g1h->gc_timer_cm(), GCCause::_no_gc, true);


 232   IsGCActiveMark x;
 233   _cl->do_void();
 234 }
 235 
 236 bool VM_CGC_Operation::doit_prologue() {
 237   // Note the relative order of the locks must match that in
 238   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 239   if (_needs_pll) {
 240     acquire_pending_list_lock();
 241   }
 242 
 243   Heap_lock->lock();
 244   return true;
 245 }
 246 
 247 void VM_CGC_Operation::doit_epilogue() {
 248   // Note the relative order of the unlocks must match that in
 249   // VM_GC_Operation::doit_epilogue()
 250   Heap_lock->unlock();
 251   if (_needs_pll) {


 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   GCIdMark gc_id_mark(_gc_id);
 229   GCTraceCPUTime tcpu;
 230   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 231   GCTraceTime(Info, gc) t(_printGCMessage, g1h->gc_timer_cm(), GCCause::_no_gc, true);
 232   TraceCollectorStats tcs(g1h->g1mm()->conc_collection_counters());
 233   SvcGCMarker sgcm(SvcGCMarker::CONCURRENT);
 234   IsGCActiveMark x;
 235   _cl->do_void();
 236 }
 237 
 238 bool VM_CGC_Operation::doit_prologue() {
 239   // Note the relative order of the locks must match that in
 240   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 241   if (_needs_pll) {
 242     acquire_pending_list_lock();
 243   }
 244 
 245   Heap_lock->lock();
 246   return true;
 247 }
 248 
 249 void VM_CGC_Operation::doit_epilogue() {
 250   // Note the relative order of the unlocks must match that in
 251   // VM_GC_Operation::doit_epilogue()
 252   Heap_lock->unlock();
 253   if (_needs_pll) {
< prev index next >