< prev index next >

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

Print this page




 190 
 191       Thread* thr = Thread::current();
 192       assert(thr->is_Java_thread(), "invariant");
 193       JavaThread* jt = (JavaThread*)thr;
 194       ThreadToNativeFromVM native(jt);
 195 
 196       MutexLockerEx x(FullGCCount_lock, Mutex::_no_safepoint_check_flag);
 197       while (g1h->old_marking_cycles_completed() <=
 198                                           _old_marking_cycles_completed_before) {
 199         FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag);
 200       }
 201     }
 202   }
 203 }
 204 
 205 void VM_CGC_Operation::doit() {
 206   GCIdMark gc_id_mark(_gc_id);
 207   GCTraceCPUTime tcpu;
 208   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 209   GCTraceTime(Info, gc) t(_printGCMessage, g1h->concurrent_mark()->gc_timer_cm(), GCCause::_no_gc, true);


 210   IsGCActiveMark x;
 211   _cl->do_void();
 212 }
 213 
 214 bool VM_CGC_Operation::doit_prologue() {
 215   Heap_lock->lock();
 216   return true;
 217 }
 218 
 219 void VM_CGC_Operation::doit_epilogue() {
 220   if (Universe::has_reference_pending_list()) {
 221     Heap_lock->notify_all();
 222   }
 223   Heap_lock->unlock();
 224 }


 190 
 191       Thread* thr = Thread::current();
 192       assert(thr->is_Java_thread(), "invariant");
 193       JavaThread* jt = (JavaThread*)thr;
 194       ThreadToNativeFromVM native(jt);
 195 
 196       MutexLockerEx x(FullGCCount_lock, Mutex::_no_safepoint_check_flag);
 197       while (g1h->old_marking_cycles_completed() <=
 198                                           _old_marking_cycles_completed_before) {
 199         FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag);
 200       }
 201     }
 202   }
 203 }
 204 
 205 void VM_CGC_Operation::doit() {
 206   GCIdMark gc_id_mark(_gc_id);
 207   GCTraceCPUTime tcpu;
 208   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 209   GCTraceTime(Info, gc) t(_printGCMessage, g1h->concurrent_mark()->gc_timer_cm(), GCCause::_no_gc, true);
 210   TraceCollectorStats tcs(g1h->g1mm()->conc_collection_counters());
 211   SvcGCMarker sgcm(SvcGCMarker::CONCURRENT);
 212   IsGCActiveMark x;
 213   _cl->do_void();
 214 }
 215 
 216 bool VM_CGC_Operation::doit_prologue() {
 217   Heap_lock->lock();
 218   return true;
 219 }
 220 
 221 void VM_CGC_Operation::doit_epilogue() {
 222   if (Universe::has_reference_pending_list()) {
 223     Heap_lock->notify_all();
 224   }
 225   Heap_lock->unlock();
 226 }
< prev index next >