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/runtime/interfaceSupport.cpp
          +++ new/hotspot/src/share/vm/runtime/interfaceSupport.cpp
↓ open down ↓ 77 lines elided ↑ open up ↑
  78   78  void InterfaceSupport::gc_alot() {
  79   79    Thread *thread = Thread::current();
  80   80    if (!thread->is_Java_thread()) return; // Avoid concurrent calls
  81   81    // Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC.
  82   82    JavaThread *current_thread = (JavaThread *)thread;
  83   83    if (current_thread->active_handles() == NULL) return;
  84   84  
  85   85    // Short-circuit any possible re-entrant gc-a-lot attempt
  86   86    if (thread->skip_gcalot()) return;
  87   87  
  88      -  if (is_init_completed()) {
       88 +  if (Threads::is_vm_complete()) {
  89   89  
  90   90      if (++_fullgc_alot_invocation < FullGCALotStart) {
  91   91        return;
  92   92      }
  93   93  
  94   94      // Use this line if you want to block at a specific point,
  95   95      // e.g. one number_of_calls/scavenge/gc before you got into problems
  96   96      if (FullGCALot) _fullgc_alot_counter--;
  97   97  
  98   98      // Check if we should force a full gc
↓ open down ↓ 190 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX