RFR: 8350889: GenShen: Break out of infinite loop of old GC cycles
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Feb 27 17:35:03 UTC 2025
On Thu, 27 Feb 2025 17:18:28 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Add log message when heuristic trigger because previous trigger is pending. Cancel the pending-trigger condition for old-generation at the start of old-generation GC.
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 246:
>
>> 244: log_trigger("GC start is already pending");
>> 245: return true;
>> 246: }
>
> Should this happen lower down? Otherwise you miss the sampling of allocation rate at this time, down at line 249. Not sure if that can be an issue. Perhaps not and you just interpolate an average over the duration since the last sample albeit missing the occasional spike or dip, with perhaps the resulting low-pass filtering here ok? It would be OK if there is not an expectation of roughly syncrhonous sampling. Depends on how the code at line 286 works, I guess.
PS: the lvalue rate at line 249 isn't used anywhere. Does the compiler complain if you `sample` without assigning the value?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23827#discussion_r1974045814
More information about the hotspot-gc-dev
mailing list