RFR: Default to ShenandoahCodeRootsStyle = 2

Aleksey Shipilev shade at redhat.com
Fri May 25 11:18:23 UTC 2018


This is the follow up to the recent improvements in code roots handling in Shenandoah:
  http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-May/006032.html

This time, we are better off to switch to style-2, which gives us parallel code roots iteration,
plus CSet filtering. The reason why style-2 is better than style-1 is because it does not visit the
nmethods that are known not to have roots in the cset. The performance runs on our set of benchmarks
shows that the "Initial Evacuation" time, and thus the "Final Mark" time had dropped significantly.

            Initial evac time, us          Improvement
         style-0   style-1   style-2   1-over-0   2-over-1
Test A      6449      1596	 298       304%       436%
Test B      6381      1656       243       285%       581%
Test C       906       351       108       158%	      225%
Test D      1021       490        88       108%	      457%
Test E      1386       653       103       112%	      534%
Test F      1022       702       664        46%	        6%
Test G      2500       806        74       210%	      989%
Test H      1500       688       568       118%	       21%
Test I       696       463       220        50%	      110%
Test J       708       336       101       111%	      233%
Test K       604       330        96        83%	      244%
Test L       701       403        88        74%	      358%
Test M      1074       332       272       223%	       22%
Test N       769       330       120       133%	      175%
Test O       679       390       265        74%	       47%
Test P      1332       518        78       157%	      564%
Test Q      1188       461       174       158%       165%
Test R      5475      1697       652       223%	      160%
Test S      2413       926       142       161%	      552%

There are other potential improvements we can do in style-2 in future, but even this provides us
with nice performance improvements.

Change:

diff -r ef24f20c2fae src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Thu May 24 20:20:48 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Fri May 25 12:21:25 2018 +0200
@@ -207,7 +207,7 @@
           "Evacuate code roots concurrently, instead of during a pause. "   \
           "This requires ShenandoahBarriersForConst to be enabled.")        \
                                                                             \
-  experimental(uintx, ShenandoahCodeRootsStyle, 1,                          \
+  experimental(uintx, ShenandoahCodeRootsStyle, 2,                          \
           "Use this style to scan code cache:"                              \
           " 0 - sequential iterator;"                                       \
           " 1 - parallel iterator;"                                         \

Testing: hotspot_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list