< prev index next >

src/share/vm/gc/shenandoah/shenandoahConcurrentThread.cpp

Print this page
rev 12669 : imported patch degenerating-marking.patch
rev 12670 : imported patch fixes.patch

@@ -52,10 +52,14 @@
       break;
     } else if (is_full_gc()) {
       service_fullgc_cycle();
     } else if (heap->shenandoahPolicy()->should_start_concurrent_mark(heap->used(), heap->capacity())) {
       service_normal_cycle();
+      if (heap->is_evacuation_in_progress()) {
+        MutexLocker mu(Threads_lock);
+        heap->set_evacuation_in_progress(false);
+      }
     } else {
       Thread::current()->_ParkEvent->park(10);
     }
     heap->monitoring_support()->update_counters();
 

@@ -140,15 +144,10 @@
     TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
     heap->do_evacuation();
   }
 
   // Prepare for the next normal cycle:
-  if (heap->is_evacuation_in_progress()) {
-    MutexLocker mu(Threads_lock);
-    heap->set_evacuation_in_progress(false);
-  }
-
   if (check_cancellation()) return;
 
   heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::reset_bitmaps);
   heap->reset_next_mark_bitmap(heap->conc_workers());
   heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::reset_bitmaps);
< prev index next >