RFR: JDK-8315479: GenShen: Expand old-gen while selecting collection set during GLOBAL GC

William Kemper wkemper at openjdk.org
Fri Sep 1 21:05:17 UTC 2023


On Fri, 1 Sep 2023 16:49:35 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> With GenShen, the size of old generation is as small as possible in order to maximize memory available to young gen.  This generally allows less frequent (and therefore more efficient) young-gen collections.
> 
> Under normal operation (concurrent marking of old followed by a series of mixed evacuations), old-gen is expanded at the end of a previous GC cycle in order to accommodate evacuation of mixed-evacuation candidates.
> 
> However, when we do a GLOBAL collection, we need to expand OLD gen during the selection of the collection set, depending on how many old-gen regions are selected to be evacuated during the GC evacuation phase.  This PR makes the change.

A couple of minor nits.

src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp line 128:

> 126:     ShenandoahHeapRegion* r = data[idx]._region;
> 127:     if (cset->is_preselected(r->index())) {
> 128:       assert(false, "There should be no preselected regions during GLOBAL GC");

Slightly more readable:

 fatal("There should be no preselected regions during GLOBAL GC");

src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp line 146:

> 144:       }
> 145:     } else {
> 146:       // r->is_young() && (r->age() < tenuring_threshold)

`assert`?

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

PR Review: https://git.openjdk.org/shenandoah/pull/318#pullrequestreview-1607661498
PR Review Comment: https://git.openjdk.org/shenandoah/pull/318#discussion_r1313517316
PR Review Comment: https://git.openjdk.org/shenandoah/pull/318#discussion_r1313518478


More information about the shenandoah-dev mailing list