< prev index next >

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

Print this page




 200                                           _old_marking_cycles_completed_before) {
 201         FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag);
 202       }
 203     }
 204   }
 205 }
 206 
 207 void VM_CGC_Operation::acquire_pending_list_lock() {
 208   _pending_list_locker.lock();
 209 }
 210 
 211 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 212   _pending_list_locker.unlock();
 213 }
 214 
 215 void VM_CGC_Operation::doit() {
 216   GCIdMark gc_id_mark(_gc_id);
 217   GCTraceCPUTime tcpu;
 218   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 219   GCTraceTime(Info, gc) t(_printGCMessage, g1h->concurrent_mark()->gc_timer_cm(), GCCause::_no_gc, true);


 220   IsGCActiveMark x;
 221   _cl->do_void();
 222 }
 223 
 224 bool VM_CGC_Operation::doit_prologue() {
 225   // Note the relative order of the locks must match that in
 226   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 227   if (_needs_pending_list_lock) {
 228     acquire_pending_list_lock();
 229   }
 230   Heap_lock->lock();
 231   return true;
 232 }
 233 
 234 void VM_CGC_Operation::doit_epilogue() {
 235   // Note the relative order of the unlocks must match that in
 236   // VM_GC_Operation::doit_epilogue()
 237   Heap_lock->unlock();
 238   if (_needs_pending_list_lock) {
 239     release_and_notify_pending_list_lock();


 200                                           _old_marking_cycles_completed_before) {
 201         FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag);
 202       }
 203     }
 204   }
 205 }
 206 
 207 void VM_CGC_Operation::acquire_pending_list_lock() {
 208   _pending_list_locker.lock();
 209 }
 210 
 211 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 212   _pending_list_locker.unlock();
 213 }
 214 
 215 void VM_CGC_Operation::doit() {
 216   GCIdMark gc_id_mark(_gc_id);
 217   GCTraceCPUTime tcpu;
 218   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 219   GCTraceTime(Info, gc) t(_printGCMessage, g1h->concurrent_mark()->gc_timer_cm(), GCCause::_no_gc, true);
 220   TraceCollectorStats tcs(g1h->g1mm()->conc_collection_counters());
 221   SvcGCMarker sgcm(SvcGCMarker::CONCURRENT);
 222   IsGCActiveMark x;
 223   _cl->do_void();
 224 }
 225 
 226 bool VM_CGC_Operation::doit_prologue() {
 227   // Note the relative order of the locks must match that in
 228   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 229   if (_needs_pending_list_lock) {
 230     acquire_pending_list_lock();
 231   }
 232   Heap_lock->lock();
 233   return true;
 234 }
 235 
 236 void VM_CGC_Operation::doit_epilogue() {
 237   // Note the relative order of the unlocks must match that in
 238   // VM_GC_Operation::doit_epilogue()
 239   Heap_lock->unlock();
 240   if (_needs_pending_list_lock) {
 241     release_and_notify_pending_list_lock();
< prev index next >