RFR: 8368015: Shenandoah: fix error in computation of average allocation rate
Kelvin Nilsen
kdnilsen at openjdk.org
Sat Sep 20 00:11:24 UTC 2025
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.
-------------
Commit messages:
- fix whitespace
- Account for gap allocations between gc cycles
Changes: https://git.openjdk.org/jdk/pull/27398/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27398&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8368015
Stats: 32 lines in 4 files changed: 25 ins; 1 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/27398.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27398/head:pull/27398
PR: https://git.openjdk.org/jdk/pull/27398
More information about the hotspot-gc-dev
mailing list