RFR: Off-by-one error in degen progress calculation
Aleksey Shipilev
shade at redhat.com
Thu Aug 30 18:20:42 UTC 2018
Freeing up one region is enough, but it is not captured, because we have off-by-one error here:
diff -r cc8a1bd74e70 src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp Thu Aug 30 20:18:48 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp Thu Aug 30 20:19:23 2018 +0200
@@ -146,11 +146,11 @@
}
// Freed up enough? Good! Declare victory.
size_t progress_actual = (_used_before > _used_after) ? _used_before - _used_after : 0;
size_t progress_expected = ShenandoahHeapRegion::region_size_bytes();
- if (progress_actual > progress_expected) {
+ if (progress_actual >= progress_expected) {
return true;
}
log_info(gc,ergo)("Not enough progress (" SIZE_FORMAT "M, need " SIZE_FORMAT "M) after %s",
progress_actual / M, progress_expected / M, label);
Testing: tier1_gc_shenandoah, eyeballing heavy degen workloads
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list