RFR: 8273476: G1: refine G1CollectedHeap::par_iterate_regions_array_part_from
Albert Mingkun Yang
ayang at openjdk.java.net
Wed Sep 8 12:21:08 UTC 2021
On Wed, 8 Sep 2021 11:56:14 GMT, Hamlin Li <mli at openjdk.org> wrote:
> G1CollectedHeap::par_iterate_regions_array_part_from is moved from G1CollectionSet::iterate_part_from in JDK-8254167.
> The parameters and logic of this method could be refined a bit to make it more straight.
Marked as reviewed by ayang (Reviewer).
src/hotspot/share/gc/g1/g1CollectedHeap.hpp line 1161:
> 1159: // the given HeapRegionClosure on each region. The worker_id will determine where
> 1160: // in the part to start the iteration to allow for more efficient parallel iteration.
> 1161: void par_iterate_regions_array_part_from(HeapRegionClosure* cl,
The comment needs to be updated as well. `const uint* regions` can be written as `const uint regions[]` to make the concept clearer, IMO.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5414
More information about the hotspot-gc-dev
mailing list