RFR: Mixed evacuation [v2]
Zhengyu Gu
zgu at openjdk.java.net
Fri Apr 9 13:55:37 UTC 2021
On Thu, 8 Apr 2021 15:32:13 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:
>
> Chasing bug during prepare_for_old_collection
>
> One bug fix, a few cosmetic improvements, a change in loop structure to possibly avoid a gcc
> optimization error.
Changes requested by zgu (Reviewer).
src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 439:
> 437: // Instead, skip to the following marked object, as indicated by the first following mark bit in
> 438: // marking_context.
> 439: int size = obj->size();
I am not sure that it is safe to walk dead oops, e.g. their classes might have been unloaded. I suggest to use marking_context->get_next_marked_addr() instead.
src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp line 510:
> 508: // Instead, skip to the following marked object, as indicated by the first following mark bit in
> 509: // marking_context.
> 510: int size = obj->size();
Same as above
src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp line 167:
> 165: //
> 166: // TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
> 167: // EventMark em("%s", msg);
Yes, I think we want them.
src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp line 67:
> 65: f(finish_mark, " Finish Mark") \
> 66: SHENANDOAH_PAR_PHASE_DO(finish_mark_, " FM: ", f) \
> 67: f(coalesce_and_fill, "Coalesce and Fill Old Dead") \
Does not seem to be used anywhere.
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/29
More information about the shenandoah-dev
mailing list