RFR: 8327997: G1: Move G1ScanClosureBase::reference_iteration_mode to subclass
Guoxiong Li
gli at openjdk.org
Wed Mar 13 07:23:17 UTC 2024
On Tue, 12 Mar 2024 16:38:36 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple moving a method from super class to sub class and some documentation.
Looks good. The root cause of such movement is that we don't create an specific object of the class `G1ScanClosureBase`. So we can override the method `reference_iteration_mode` in its subclasses instead of `G1ScanClosureBase` itself.
If we need to write so much comments to explain such movement, I suggest that we should write more comments in `src/hotspot/share/memory/iterator.hpp::ReferenceIterationMode` to explain the related things clearer.
-------------
Marked as reviewed by gli (Committer).
PR Review: https://git.openjdk.org/jdk/pull/18244#pullrequestreview-1933320438
More information about the hotspot-gc-dev
mailing list