JDK-8224741 : Optimize the scan area during the Scan Heap Roots phase
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-24
  • Updated: 2019-07-16
  • Resolved: 2019-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b05Fixed
Related Reports
Blocks :  
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).