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

Thomas Schatzl tschatzl at openjdk.java.net
Mon Sep 6 09:41:31 UTC 2021


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5333/files
  - new: https://git.openjdk.java.net/jdk/pull/5333/files/4c4d5177..c2122611

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5333&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5333&range=00-01

  Stats: 31 lines in 1 file changed: 0 ins; 31 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5333.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5333/head:pull/5333

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



More information about the hotspot-gc-dev mailing list