RFR: 8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap
Thomas Schatzl
tschatzl at openjdk.java.net
Wed Sep 1 15:13:21 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
-------------
Commit messages:
- Minor cleanup
- Merge master
Changes: https://git.openjdk.java.net/jdk/pull/5333/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5333&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253343
Stats: 2384 lines in 7 files changed: 1323 ins; 1048 del; 13 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