8226586: Shenandoah: No need to pre-evacuate roots for degenerated GC
Reviewed-by: rkennke
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Sat Jun 22 02:03:41 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Mon Jun 24 09:51:45 2019 -0400
@@ -1513,7 +1513,9 @@
// From here on, we need to update references.
set_has_forwarded_objects(true);
- evacuate_and_update_roots();
+ if (!is_degenerated_gc_in_progress()) {
+ evacuate_and_update_roots();
+ }
if (ShenandoahPacing) {
pacer()->setup_for_evac();