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

Optimize the scan area during the Scan Heap Roots phase

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b05

      Description

      In JDK-8213108 we introduced work distribution of heap root scanning based on a combined/merged set of cards.

      There we jump from block (contiguous sets of card to be scanned) to block, and restart scanning from each start of the block.

      However, (non-objArray) objects may span multiple cards, and may be marked in different blocks. In this case we start scanning from the start of the object again, rescanning some area multiple times.

      This is a waste of time, and causes some other minor side effects (card can be added multiple times to the log buffers.

      This behavior can be minimized by remembering for the last block where we stopped scanning, and start at addresses >= that.

      In some situations this saves scanning of entire blocks.

      Note that this does not prevent rescanning for non-ObjArrays spanning multiple chunks.

      Performance testing of this change showed no impact either way due to general scarcity of such objects (must be non-ObjArray spanning at least three cards with multiple cards to scan on it, but it can save time).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: