RFR: 8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap [v2]

Stefan Johansson sjohanss at openjdk.java.net
Mon Sep 6 14:06:40 UTC 2021


On Mon, 6 Sep 2021 09:41:31 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
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed obsolete file

Looks good to me.

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

Marked as reviewed by sjohanss (Reviewer).

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



More information about the hotspot-gc-dev mailing list