RFR: Increase card offset mask
Kelvin Nilsen
kdnilsen at openjdk.org
Tue May 9 19:55:08 UTC 2023
On Tue, 9 May 2023 16:51:30 GMT, William Kemper <wkemper at openjdk.org> wrote:
> On 32-bit platforms, a 512 byte card covers 128 words. On 64-bit platforms, a 1024 byte card (the maximum allowed) also covers 128 words. This change increases the size of the mask we use when encoding object start offsets to handle these situations.
Marked as reviewed by kdnilsen (Committer).
src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp line 394:
> 392: // frequently than last byte. This is true when number of clean cards is greater than number of dirty cards.
> 393: static const uint16_t ObjectStartsInCardRegion = 0x80;
> 394: static const uint16_t FirstStartBits = 0x3f;
Nice catch. BTW, the cross_map structure is no longer needed and neither is the last field, and the comment that makes mention of the "last" field can be updated. We really only need one byte to represent crossing information of each card in the remembered set.
I suggest integrating this as is, and doing further refactoring as a future TODO.
-------------
PR Review: https://git.openjdk.org/shenandoah/pull/275#pullrequestreview-1419360655
PR Review Comment: https://git.openjdk.org/shenandoah/pull/275#discussion_r1189069588
More information about the shenandoah-dev
mailing list