< prev index next >

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

Print this page

        

@@ -196,11 +196,25 @@
 
     {
       GCTraceTime(Info, gc) time("Concurrent update references ", gc_timer, GCCause::_no_gc, true);
       heap->concurrent_update_heap_references();
     }
-    if (check_cancellation()) return;
+
+    clear_full_gc = false;
+    if (heap->cancelled_concgc()) {
+      heap->shenandoahPolicy()->record_uprefs_cancelled();
+      if (_full_gc_cause == GCCause::_allocation_failure &&
+          heap->shenandoahPolicy()->handover_cancelled_uprefs()) {
+        clear_full_gc = true;
+        heap->shenandoahPolicy()->record_uprefs_degenerated();
+      } else {
+        heap->gc_timer()->register_gc_end();
+        return;
+      }
+    } else {
+      heap->shenandoahPolicy()->record_uprefs_success();
+    }
 
     VM_ShenandoahFinalUpdateRefs final_update_refs;
 
     heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::total_pause_gross);
     heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::final_update_refs_gross);

@@ -210,10 +224,14 @@
   }
 
   // Prepare for the next normal cycle:
   if (check_cancellation()) return;
 
+  if (clear_full_gc) {
+    reset_full_gc();
+  }
+
   {
     GCTraceTime(Info, gc) time("Concurrent reset bitmaps", gc_timer, GCCause::_no_gc);
     heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::reset_bitmaps);
     WorkGang* workers = heap->workers();
     ShenandoahPushWorkerScope scope(workers, heap->max_workers());
< prev index next >