JDK-8273476 : G1: refine G1CollectedHeap::par_iterate_regions_array_part_from
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-08
  • Updated: 2021-09-13
  • Resolved: 2021-09-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 masterFixed
Related Reports
Relates :  
Description
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.

"This method essentially apply a closure to all elements in [offset, length) of regions. I wonder if we can pass &regions[offset] and length-offset to this method. Then this method can work on the whole array, and figuring out the starting index for each worker becomes trivial, worker_id * array_len / #workers. It's not obvious to me why the calculation in this patch guarantees balanced start index."
Comments
Changeset: 9690df7f Author: Hamlin Li <mli@openjdk.org> Date: 2021-09-09 10:41:27 +0000 URL: https://git.openjdk.java.net/jdk/commit/9690df7fb9843bdc4775a34d94b2ca81f40aea0a
09-09-2021