RFR: 8339611: GenShen: Simplify ShenandoahOldHeuristics::trigger_collection_if_fragmented [v3]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Sep 11 17:30:19 UTC 2024
On Tue, 10 Sep 2024 23:46:49 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve comments and clarify intent of old_region_span
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 553:
>
>> 551: // at density of the old-gen spanned region. A different mechanism triggers old-gen GC if the total number of
>> 552: // old-gen regions (regardless of how close the regions are to one another) grows beyond an anticipated growth target.
>> 553: void ShenandoahOldHeuristics::trigger_collection_if_fragmented(size_t first_old_region, size_t last_old_region,
>
> I'd name this method `set_fragmentation_trigger()`, with the side-effect that the fragmentation measures are recorded for logging, and associated triggers are set which are used later to start an old cycle.
>
> I'd then rename `trigger_maybe()` to `set_triggers()`, and rename `trigger_collection_if_overgrown()` to `set_growth_trigger()`, etc.
Thanks. Renaming trigger_old_has_grown() to set_growth_trigger(). Renaming trigger_old_is_fragmented() to set_fragmentation_trigger(). Ranaming trigger_maybe() to evaluate_triggers().
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/492#discussion_r1755211471
More information about the shenandoah-dev
mailing list