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

HeapRegionManager::shrink_by() iterates suboptimally across regions

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b81

      Backports

        Description

        Noticed by kbarrett:

        In line 431 of heapRegionManager.cpp, HeapRegionManager::shrink_by() the decrement while iterating over the heap region table is suboptimal, e.g. the "cur -= num_last_found;" statement.

        If the recent scan had to skip over a block of !available || !empty regions to find the regions that were just removed, that skipped block isn't accounted for by that decrement. I think a better iteration step would be "cur = idx_last_found;"

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tschatzl Thomas Schatzl
                  Reporter:
                  tschatzl Thomas Schatzl
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: