RFR: Mixed evacuation [v7]
Zhengyu Gu
zgu at openjdk.java.net
Thu Apr 22 17:58:49 UTC 2021
On Wed, 21 Apr 2021 23:48:09 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> This code adds to generational Shenandoah the ability to perform concurrent garbage collection of young-gen and old-gen memory. Following completion of an old-gen concurrent marking effort, we select certain old-gen heap regions to serve as candidates for future collection sets. All dead objects within the old-gen heap regions that are not part of this candidate set are coalesced and filled so that remembered-set scanning of these old-gen heap regions will not be confused by "zombie objects" (objects that old-gen has decided are dead, which reside in regions that have not yet been collected). After concurrently coalescing and filling these dead objects, each subsequent young-gen evacuation pass includes a subset of the old-gen candidates until all candidates have been collected. This code passes TIER1 and hotspot-gc-shenandoah jtreg tests without regressions. A new jtreg test has been added to exercise concurrent old/young GC.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>
> Cosmetic improvements requested by review
>
> Following these changes, we ran jtreg TIER1 and hotspot_gc_shenandoah tests with no regressions.
> Also ran a stress Extremem workload.
Changes requested by zgu (Reviewer).
src/hotspot/share/gc/shenandoah/mode/shenandoahMode.cpp line 58:
> 56: ShenandoahOldHeuristics* ShenandoahMode::initialize_old_heuristics(ShenandoahGeneration* generation) const {
> 57:
> 58: if (ShenandoahGCHeuristics != NULL) {
Should be assert or guarantee ?
src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp line 65:
> 63:
> 64: ShenandoahOldHeuristics* ShenandoahPassiveMode::initialize_old_heuristics(ShenandoahGeneration* generation) const {
> 65: if (ShenandoahGCHeuristics != NULL) {
Looks like you can convert this if stmt to assert or guarantee?
src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp line 130:
> 128: virtual bool is_concurrent_mark_in_progress() = 0;
> 129:
> 130: private:
Style nit: no leading space. The same as "protected" above (pre-exist)
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 496:
> 494: CollectedHeap(),
> 495: _gc_generation(NULL),
> 496: _old_heuristics(NULL),
Minor style nit: jdk17 started to use nullptr to replace NULL
src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp line 88:
> 86: entry_coalesce_and_fill();
> 87:
> 88: old_heuristics->start_old_evacuations();
Could you encapsulate in entry_old_evacuations() with proper timing/logging? it really helps future debugging the crashes with hs_err file.
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/29
More information about the shenandoah-dev
mailing list