RFR: 8368015: Shenandoah: fix error in computation of average allocation rate [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Sep 23 15:03:25 UTC 2025


On Mon, 22 Sep 2025 19:13:41 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.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove state variable previous GC allocated

I've also run current baseline tests for comparison with this branch.  Here are the results:

<img width="2014" height="436" alt="image" src="https://github.com/user-attachments/assets/1c710552-b942-4409-b6e6-f99bc63130a3" />

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

PR Comment: https://git.openjdk.org/jdk/pull/27398#issuecomment-3324392518


More information about the hotspot-gc-dev mailing list