RFR: Only put regions with objects into traversal set

Roman Kennke rkennke at redhat.com
Thu Jun 14 18:10:51 UTC 2018


We don't need to traverse newly allocated objects and their containing
regions. We seem to put *all* regions into the t-set initially, which is
bogus.

It is important to traverse through evac-regions (regions being
allocated into). This is handled specially in ShFreeSet already.

Good?

Roman

# HG changeset patch
# User rkennke
# Date 1528999758 -7200
#      Thu Jun 14 20:09:18 2018 +0200
# Node ID b9f71516c7385b1a00380e691ce400217232d257
# Parent  96bdf0be39a10cba5b5ffee2f23f44d7d75f5f32
Only put regions with objects into traversal set

diff --git
a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahTraversalHeuristics.cpp
b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahTraversalHeuristics.cpp
---
a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahTraversalHeuristics.cpp
+++
b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahTraversalHeuristics.cpp
@@ -83,9 +83,9 @@
       if (garbage_percent > ShenandoahGarbageThreshold) {
         collection_set->add_region(r);
       }
+      traversal_set->add_region(r);
     }
     r->clear_live_data();
-    traversal_set->add_region(r);
   }
   collection_set->update_region_status();
 }



More information about the shenandoah-dev mailing list