RFR: 8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap
Albert Mingkun Yang
ayang at openjdk.java.net
Thu Sep 2 14:24:06 UTC 2021
On Wed, 1 Sep 2021 14:53:56 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this change that moves the G1 young collection algorithm containing the collection part out of `G1CollectedHeap` into a new `G1YoungCollector` class.
>
> This change is mostly limited to moving the young collection specific code out; data structures are mostly kept in `G1CollectedHeap` for one reason or another, most of the time just to decrease the amount of code changes.
>
> That will be fixed by upcoming (smaller) changes.
>
> Other random comments:
> * I am aware that the class forward definitions in `g1CollectedHeap.hpp` are unsorted, but they were already and I will fix that later.
> * there will be some cleanup of `G1CollecteHeap` interface: at the moment, to reduce changes, I moved only code that was easy to move, and added back-references to `G1CollectedHeap`. There is a large list of getters for those in `G1YoungCollector`. These will be investigated one by one whether they can be removed by moving other code to `G1YoungCollector`.
> * what I would like to move is at least data like the heap region attribute table, evacuation failure temporary information and others
> * some data will likely move from `G1CollectedHeap` to some class that contains long term state specific to the young collection (e.g. evacuation failure injector, evacuation failure final result?, _bytes_used_during_gc, _gc_timer_stw, _gc_tracer_stw, stw reference processor and related closures)
>
> So lots of changes ahead, but this is a significant first step to avoid me doing tricky merges over and over again.
>
> Testing: tier1-5
>
> Thanks,
> Thomas
Marked as reviewed by ayang (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/5333
More information about the hotspot-gc-dev
mailing list