RFR: DRAFT: Expand old on demand [v17]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Apr 19 18:07:24 UTC 2023
> This PR describes several proposed changes to dynamically adjust the sizes of old-gen and young-gen. In general, the objective is to keep old-gen as small as possible so that there is an abundance of memory available for the young-gen allocation runway.
>
> As currently drafted, there are regression failures. This DRAFT PR is published for the purpose of facilitating a careful code review.
Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 94 commits:
- Merge remote-tracking branch 'origin' into expand-old-on-demand
- Do not call min_threshold unless generation is not old
Following the merge, min_threshold() asserts generation is not old.
min_threshold() is not relevant to old-generation GC triggers.
- Merge remote-tracking branch 'origin' into expand-old-on-demand
- Fix whitespace errors
- Fix my fix for overwriting update_watermark in promote_in_place
I wasn't careful enough to assure that I did not introduce another
assertion error with my previous "fix".
- Overwrite update_water_mark in ShenandoahHeapRegion::promote_in_place
While a region waits to be promoted in place, its value of top equals
end. This is a temporary arrangement, to prevent young-gen objects
from being allocated within this region before it is promoted. Once
the region is promoted, its value of top() is adjusted to its previous
value. The region's update_watermark value was likely set when the
region had its artificially high value of top. So we fix it here.
- Degen GC needs to evacuate even if cset is empty in some cases
In particular, when there are humongous or regular regions to be promoted
in place, we still need to "evacuate", because the evacuation phase takes
responsibility for registering objects and building the remembered set.
- Refine generational assertions for full-gc mode
Certain assertions are not valid in full gc mode because full gc does not
necessarily maintain all invariants during the STW pause. By the time
full gc finishes, all invariants should be restored, and they are checked
then.
- Do not verify usage accounting at start of Full GC
If we degenerate to full in the middle of evacuation, usage accounts are in limbo.
- Remove unreferenced variable
- ... and 84 more: https://git.openjdk.org/shenandoah/compare/016bf071...23b8b396
-------------
Changes: https://git.openjdk.org/shenandoah/pull/248/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=248&range=16
Stats: 3223 lines in 35 files changed: 1798 ins; 887 del; 538 mod
Patch: https://git.openjdk.org/shenandoah/pull/248.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/248/head:pull/248
PR: https://git.openjdk.org/shenandoah/pull/248
More information about the shenandoah-dev
mailing list