Print this page
rev 6902 : 8062036: ConcurrentMarkThread::slt may be invoked before ConcurrentMarkThread::makeSurrogateLockerThread causing intermittent crashes
Summary: Suppress gc_alot during VM init, improve error for SLT uninitialized.
Reviewed-by: jmasa, brutisso, tschatzl

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
          +++ new/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
↓ open down ↓ 205 lines elided ↑ open up ↑
 206  206          FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag);
 207  207        }
 208  208      }
 209  209    }
 210  210  }
 211  211  
 212  212  void VM_CGC_Operation::acquire_pending_list_lock() {
 213  213    assert(_needs_pll, "don't call this otherwise");
 214  214    // The caller may block while communicating
 215  215    // with the SLT thread in order to acquire/release the PLL.
 216      -  ConcurrentMarkThread::slt()->
 217      -    manipulatePLL(SurrogateLockerThread::acquirePLL);
      216 +  SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
      217 +  if (slt != NULL) {
      218 +    slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
      219 +  } else {
      220 +    SurrogateLockerThread::report_missing_slt();
      221 +  }
 218  222  }
 219  223  
 220  224  void VM_CGC_Operation::release_and_notify_pending_list_lock() {
 221  225    assert(_needs_pll, "don't call this otherwise");
 222  226    // The caller may block while communicating
 223  227    // with the SLT thread in order to acquire/release the PLL.
 224  228    ConcurrentMarkThread::slt()->
 225  229      manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
 226  230  }
 227  231  
↓ open down ↓ 35 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX