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

G1: refine G1CollectedHeap::par_iterate_regions_array_part_from

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • gc
    • b15

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

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

              Created:
              Updated:
              Resolved: