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