RFR: 8368681: Shenandoah: Add documentation comments for ShenandoahAllocationRate
William Kemper
wkemper at openjdk.org
Thu Sep 25 23:52:22 UTC 2025
On Thu, 25 Sep 2025 23:33:56 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> Add documentation to ShenandoahAllocationRate
Just a few typos
src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp line 52:
> 50: // The sampled allocation rate is computed from (allocated - _last_sample_value) / (current_time - _last_sample_time).
> 51: // Return the newly computed rate if the sample is taken, zero if it is not an appropriate time to add a sample.
> 52: // In the case that a new sample is not take, overwrite unaccounted_bytes_allocated with bytes allocated since
s/take/taken
src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp line 53:
> 51: // Return the newly computed rate if the sample is taken, zero if it is not an appropriate time to add a sample.
> 52: // In the case that a new sample is not take, overwrite unaccounted_bytes_allocated with bytes allocated since
> 53: // the previous sample was taken (allocated - __last_sample_value). Otherwise, overwrite unaccounted_byets_allocated
s/byets/bytes
src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp line 73:
> 71: private:
> 72:
> 73: // Return the instantaneous rate calculated from from (allocated - _last_sample_value) / (time - _last_sample_time).
s/from from/from
-------------
Changes requested by wkemper (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27505#pullrequestreview-3269736178
PR Review Comment: https://git.openjdk.org/jdk/pull/27505#discussion_r2380542331
PR Review Comment: https://git.openjdk.org/jdk/pull/27505#discussion_r2380542829
PR Review Comment: https://git.openjdk.org/jdk/pull/27505#discussion_r2380544508
More information about the hotspot-gc-dev
mailing list