RFR: 8255765: Shenandoah: Isolate concurrent, degenerated and full GC [v5]
Aleksey Shipilev
shade at openjdk.java.net
Thu Jan 21 16:48:56 UTC 2021
On Thu, 21 Jan 2021 13:44:53 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> The purpose of this patch is to isolate concurrent, degenerated and full gc implementation, so that, makes each GC implementation more straightforward and clean, and improves readability.
>>
>> Current implementation emphasis code sharing, e.g. degenerated GC reuses concurrent GC's ops. It was not a problem in the beginning, when they actually behave similarly. Since concurrent GC moved root processing into concurrent phases, code started to diverge, we started to put bandages to make the shared ops work for both concurrent and degenerated GC, that made code hard to read and error prone.
>>
>> The patch breaks up GCs into 3 (mainly just concurrent and degenerated GC, as full GC already standalone) easy to identify and understand classes (ShenandoahConcurrentGC, ShenandoahDegeneratedGC and ShenandoahMarkCompactGC), subclasses of ShenandoahGC class.
>>
>> The three GCs still keep vmop/entry/op paradigm, but encapsulate GC control flow inside their own classes, as ShenandoahMarkCompact GC already does. So that, concurrent and degenerated GC no longer share ops and op implementations no longer need to consider other GC modes, which results in simplifying implementation and improving readability. Code sharing is achieved via helper methods provided by ShenandoahHeap.
>>
>> Test:
>> - [x] hotspot_gc_shenandoah
>> - [x] nightly tests
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed indentation
Looks good.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1964
More information about the shenandoah-dev
mailing list