RFR: Increase card offset mask [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Wed May 10 15:22:17 UTC 2023


On Tue, 9 May 2023 20:48:41 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> 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.
>
> Hmm, we are definitely using the `last` field in the `cross_map` struct. I'd have to study the code to understand how we could remove it.

You are right that we are still "maintaining" the last field and there are many references to it in the code.  I am thinking that with Ramki's changes to remembered set scanning, it is no longer used in scanning, but I may be remembering this incorrectly.

I agree this is not a subtle change and would require some "study" to make sure it is done properly, if at all.

-------------

PR Review Comment: https://git.openjdk.org/shenandoah/pull/275#discussion_r1190069097


More information about the shenandoah-dev mailing list