Integrated: 8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap

Thomas Schatzl tschatzl at openjdk.java.net
Mon Sep 6 14:32:45 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

This pull request has now been integrated.

Changeset: 2cabec8d
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/2cabec8ddc19dd66495957e7ef553990a502e993
Stats:     2353 lines in 6 files changed: 1292 ins; 1048 del; 13 mod

8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap

Reviewed-by: ayang, sjohanss

-------------

PR: https://git.openjdk.java.net/jdk/pull/5333



More information about the hotspot-gc-dev mailing list