RFR (S): 8179679: Rearrange filters before card scanning
thomas.schatzl at oracle.com
Tue Jul 4 15:42:33 UTC 2017
On Mon, 2017-07-03 at 13:24 +0200, Thomas Schatzl wrote:
> Hi all,
> please have a look at this change that rearranges the checks in the
> G1RemSet card scanning a bit in order to:
Erik had a look at this change with the following comments:
- rename card_region_idx -> region_idx_for_card
- factor out the two calls to claim a card and dirty its region into a
- move calculation of "card_region" into the scan_card() method.
- he pointed out that the change can use G1CollectedHeap::region_at()
instead of G1CollectedHeap::heap_region_containing() as it is simpler.
- there has been another comment on why the change claims the card
after checking whether the card is within the region's boundaries, and
if that wouldn't be better performed right after the is_claimed check.
Doing so will claim cards originating from stray remembered set entries
into the current survivor regions as claimed, since we do not clear
these regions later again (see G1ClearCardTableTask::work()) - their
cards need to be "Young", and this is done during allocation of the
This results in the card table verification to fail later.
I think if we should think of changing the handling of survivor regions
during the clear CT phase as part of a different CR. For now I added a
More information about the hotspot-gc-dev