RFR: In update-refs, update all code-roots when in degen-gc

Roman Kennke rkennke at redhat.com
Wed Sep 12 10:38:50 UTC 2018


Some tests seem to sporadically fail with assert_not_forwarded failure
in code roots, coming from update_refs/degen phase. This usually happens
with aggressive and +OOMDuringEvacALot. It seems that when we
update-roots in the update-refs/degen phase, we can see code roots that
have not been updated. I suspect that this can happen when evac fails
(due to +OOMDuringEvacALot). Proposed fix is to always update all code
roots when updating-refs in degen.

Test: tier3_gc_shenandoah

# HG changeset patch
# User rkennke
# Date 1536748072 -7200
#      Wed Sep 12 12:27:52 2018 +0200
# Node ID 119faef8f9fd3cd5259e8558763c4a446eb1e4ea
# Parent  020632e98637618ef302eb4cf241cb76be6edca6
In update-refs, update all code-roots when in degen-gc

diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
@@ -2352,7 +2352,9 @@
   }
   assert(!cancelled_gc(), "Should have been done right before");

-
concurrentMark()->update_roots(ShenandoahPhaseTimings::final_update_refs_roots);
+  concurrentMark()->update_roots(is_degenerated_gc_in_progress() ?
+                                 ShenandoahPhaseTimings::full_gc_roots:
+
ShenandoahPhaseTimings::final_update_refs_roots);

   ShenandoahGCPhase
final_update_refs(ShenandoahPhaseTimings::final_update_refs_recycle);



More information about the shenandoah-dev mailing list