< prev index next >

hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp

Print this page
rev 7125 : 7176220: 'Full GC' events miss date stamp information occasionally
Summary: Move date stamp logic into GCTraceTime
Reviewed-by: brutisso, tschatzl


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


 213   assert(_needs_pll, "don't call this otherwise");
 214   // The caller may block while communicating
 215   // with the SLT thread in order to acquire/release the PLL.
 216   SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
 217   if (slt != NULL) {
 218     slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
 219   } else {
 220     SurrogateLockerThread::report_missing_slt();
 221   }
 222 }
 223 
 224 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 225   assert(_needs_pll, "don't call this otherwise");
 226   // The caller may block while communicating
 227   // with the SLT thread in order to acquire/release the PLL.
 228   ConcurrentMarkThread::slt()->
 229     manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
 230 }
 231 
 232 void VM_CGC_Operation::doit() {

 233   TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
 234   GCTraceTime t(_printGCMessage, G1Log::fine(), true, G1CollectedHeap::heap()->gc_timer_cm(), G1CollectedHeap::heap()->concurrent_mark()->concurrent_gc_id());
 235   SharedHeap* sh = SharedHeap::heap();
 236   // This could go away if CollectedHeap gave access to _gc_is_active...
 237   if (sh != NULL) {
 238     IsGCActiveMark x;
 239     _cl->do_void();
 240   } else {
 241     _cl->do_void();
 242   }
 243 }
 244 
 245 bool VM_CGC_Operation::doit_prologue() {
 246   // Note the relative order of the locks must match that in
 247   // VM_GC_Operation::doit_prologue() or deadlocks can occur
 248   if (_needs_pll) {
 249     acquire_pending_list_lock();
 250   }
 251 
 252   Heap_lock->lock();
< prev index next >