RFR: Convert magic value to ShenandoahPacingSurcharge
Aleksey Shipilev
shade at redhat.com
Tue Aug 14 08:48:23 UTC 2018
The change speaks for itself:
diff -r b3dae83fdf52 src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Tue Aug 14 09:53:21 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Tue Aug 14 10:47:33 2018 +0200
@@ -69,3 +69,3 @@
tax *= 3; // mark is phase 1 of 3, claim 1/3 of free for it
- tax *= 1.1; // additional surcharge to help unclutter heap
+ tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
@@ -98,3 +98,3 @@
tax = MAX2<double>(1, tax); // never allocate more than GC processes during the phase
- tax *= 1.1; // additional surcharge to help unclutter heap
+ tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
@@ -119,3 +119,3 @@
tax = MAX2<double>(1, tax); // never allocate more than GC processes during the phase
- tax *= 1.1; // additional surcharge to help unclutter heap
+ tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
@@ -143,3 +143,3 @@
double tax = 1.0 * live / taxable; // base tax for available free space
- tax *= 1.1; // additional surcharge to help unclutter heap
+ tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
@@ -168,3 +168,3 @@
tax = MAX2<double>(1, tax); // never allocate more than GC collects during the cycle
- tax *= 1.1; // additional surcharge to help unclutter heap
+ tax *= ShenandoahPacingSurcharge; // additional surcharge to help unclutter heap
diff -r b3dae83fdf52 src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp Tue Aug 14 09:53:21 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp Tue Aug 14 10:47:33 2018 +0200
@@ -406,2 +406,9 @@
\
+ experimental(double, ShenandoahPacingSurcharge, 1.1, \
+ "Additional pacing tax surcharge to help unclutter the heap. " \
+ "Larger values makes the pacing more aggressive. Lower values " \
+ "risk GC cycles finish with less memory than were available at " \
+ "the beginning of it.") \
+ range(1, 100) \
+ \
experimental(uintx, ShenandoahCriticalFreeThreshold, 1, \
Testing: tier3_gc_shenandoah
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list