RFR: 8368015: Shenandoah: fix error in computation of average allocation rate [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Sep 23 15:03:22 UTC 2025
On Mon, 22 Sep 2025 23:10:07 GMT, William Kemper <wkemper at openjdk.org> wrote:
> Should we move [this line](https://github.com/openjdk/jdk/pull/27398/files#diff-5cbba824b4e4b914425672f0d1bea49b44aa48940fd07f517b7312055927c575R249)
> where we take the allocation sample above the early exit when `_start_gc_is_pending`?
> Not directly related to this PR, but seems to be in the spirit of making the allocation rate sampling more accurate.
That's a good suggestion. I'll move it.
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 382:
>
>> 380: }
>> 381:
>> 382: double ShenandoahAllocationRate::sample(size_t allocated, bool force_update) {
>
> `force_update` looks unused here.
Thanks for that catch. I failed to clean up my mess after an earlier experiment that didn't work... Fixed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27398#issuecomment-3324386185
PR Review Comment: https://git.openjdk.org/jdk/pull/27398#discussion_r2372626061
More information about the hotspot-gc-dev
mailing list