8224495: Shenandoah: Do not rescan code roots in final mark pause if it is not degenerated GC
authorzgu
Tue, 21 May 2019 13:06:52 -0400
changeset 54963 a5f5e680ea32
parent 54962 1b28206dcbcb
child 54964 ec7d6d8effc7
8224495: Shenandoah: Do not rescan code roots in final mark pause if it is not degenerated GC Reviewed-by: shade
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp	Tue May 21 18:22:54 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp	Tue May 21 13:06:52 2019 -0400
@@ -227,9 +227,12 @@
       rp = NULL;
     }
 
-    // Degenerated cycle may bypass concurrent cycle, so code roots might not be scanned,
-    // let's check here.
-    _cm->concurrent_scan_code_roots(worker_id, rp);
+    if (heap->is_degenerated_gc_in_progress()) {
+      // Degenerated cycle may bypass concurrent cycle, so code roots might not be scanned,
+      // let's check here.
+      _cm->concurrent_scan_code_roots(worker_id, rp);
+    }
+
     _cm->mark_loop(worker_id, _terminator, rp,
                    false, // not cancellable
                    _dedup_string);