RFR: 8255765: Shenandoah: Isolate concurrent, degenerated and full GC [v5]
Zhengyu Gu
zgu at openjdk.java.net
Thu Jan 21 13:44:53 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:
Fixed indentation
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1964/files
- new: https://git.openjdk.java.net/jdk/pull/1964/files/514aac66..7119186c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1964&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1964&range=03-04
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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