RFR: 8373714: Shenandoah: Register heuristic penalties following a degenerated GC [v2]

William Kemper wkemper at openjdk.org
Tue Dec 16 18:31:08 UTC 2025


On Tue, 16 Dec 2025 16:57:53 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Add a triggering penalty when we execute degenerated GC cycle.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   refactor for reviewer requests

Suggest we either rename `record_successful_degenerated` -> `record_degenerated`, or just reuse it.

src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp line 321:

> 319:     op_degenerated_futile();
> 320:   } else {
> 321:     _generation->heuristics()->record_unsuccessful_degenerated();

Suggestion:

    _generation->heuristics()->record_successful_degenerated();

I think the confusion here is that we are conflating `progress` and `success`. The "progress" notion here is  about triggering a full GC or giving up entirely. The degenerated cycle is "successful" because it did not run a full GC. Maybe we should rename `record_successful_degenerated` to `record_degenerated` (or, perhaps even `apply_degenerated_penalty`). I was about to suggest we pull `record_success_degenerated` out of the logic entirely, but that would mean upgraded degen cycles would be penalized again when the full GC completes.

-------------

Changes requested by wkemper (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28834#pullrequestreview-3584439536
PR Review Comment: https://git.openjdk.org/jdk/pull/28834#discussion_r2624308749


More information about the hotspot-gc-dev mailing list