Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8273476

G1: refine G1CollectedHeap::par_iterate_regions_array_part_from

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b15

      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."

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mli Hamlin Li
              Reporter:
              mli Hamlin Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: