RFR: 8255765: Shenandoah: Isolate concurrent, degenerated and full GC [v2]
Zhengyu Gu
zgu at openjdk.java.net
Tue Jan 19 18:24:04 UTC 2021
> 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:
Aleksey's comments
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1964/files
- new: https://git.openjdk.java.net/jdk/pull/1964/files/d9805040..93b2ceed
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1964&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1964&range=00-01
Stats: 32 lines in 7 files changed: 3 ins; 15 del; 14 mod
Patch: https://git.openjdk.java.net/jdk/pull/1964.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1964/head:pull/1964
PR: https://git.openjdk.java.net/jdk/pull/1964
More information about the shenandoah-dev
mailing list