Blocks :
|
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).