Integrated: 8368015: Shenandoah: fix error in computation of average allocation rate

Kelvin Nilsen kdnilsen at openjdk.org
Wed Sep 24 22:51:49 UTC 2025


On Fri, 19 Sep 2025 20:36:51 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> We use bytes_allocated_since_gc_start() to compute allocation rates.  This leaves a blind spot, as our current implementation ignores allocations and the time period between the moment we begin GC and the first time we update the allocation rate following the start of GC.  When this happens, we typically find that the sampled number of allocations is smaller than the allocations that had accumulated by the time we triggered the start of the current GC cycle.
> 
> This PR adds tracking for that accounting gap.

This pull request has now been integrated.

Changeset: a2870d6b
Author:    Kelvin Nilsen <kdnilsen at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a2870d6b4985a68beb3fe3bf6622e6245e9a82ec
Stats:     80 lines in 7 files changed: 56 ins; 6 del; 18 mod

8368015: Shenandoah: fix error in computation of average allocation rate

Reviewed-by: wkemper

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

PR: https://git.openjdk.org/jdk/pull/27398


More information about the hotspot-gc-dev mailing list