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

Parallel: Refactor PSParallelCompact::next_src_region

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • gc
    • b02

      This method is used to locate the next source-region to continue filling up the current destination-region (`PSParallelCompact::fill_region`). It has two exits, one for finding a non-empty region in the same source space, while the other for in another space.

      The first arg of this method is used as an out-parameter, essentially `closure._source`, which should be corresponding to the returned region-index. One can just use the found region-index to calculate the intended value for `closure._source`.

      Therefore, the condition check `if (src_region_addr > closure.source()) {` is not needed and often `true`, and `mark_bitmap()->find_obj_beg` is already handled by the caller. Remove both to streamline the flow.

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: