Parallel: Refactor PSParallelCompact::next_src_region

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: