RFR: 8332717: ZGC: Division by zero in heuristics

Erik Österlund eosterlund at openjdk.org
Thu Jun 20 05:25:19 UTC 2024


On Wed, 19 Jun 2024 08:38:52 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Before we have run the first major collection, the "time to perform GC" is considered not stable. We missed once such check when computing how many old GC threads we should use compared to young GC threads, resulting in a division by zero when starting the first "warmup" major collection. This division by zero is detected by UBSan. I added a check for unstable times like we have in many other places, which I have verified removes the problem.
>
> lgtm.

Thanks for the reviews @xmas92 and @shipilev! Good catch with the affects version. I changed it now. Phew!

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

PR Comment: https://git.openjdk.org/jdk/pull/19768#issuecomment-2179838529


More information about the hotspot-gc-dev mailing list