RFR: 8330576: ZYoungCompactionLimit should have range check

Stefan Karlsson stefank at openjdk.org
Thu Apr 18 12:51:57 UTC 2024


On Thu, 18 Apr 2024 12:18:11 GMT, Jonas Norlinder <duke at openjdk.org> wrote:

> Currently any double is allowed for `ZYoungCompactionLimit`. This is wrong for two reasons, it should express the percentage of fragmentation on a page, so only [0,100] would be valid numbers. Moreover, if a user inputs a negative or larger than 100 number the method `ZHeuristics::significant_young_overhead` would return improper values leading to broken heuristics.
> 
> This patch adds a range check for `ZYoungCompactionLimit`.

Great that you found this bug and thanks for fixing! Looks good.

-------------

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18838#pullrequestreview-2008799010


More information about the hotspot-gc-dev mailing list