RFR: Increase card offset mask [v2]

William Kemper wkemper at openjdk.org
Wed May 10 22:34:28 UTC 2023


On Wed, 10 May 2023 21:06:06 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp line 401:
>> 
>>> 399:   // If we're setting first_start, assume the card has an object.
>>> 400:   inline void set_first_start(size_t card_index, uint8_t value) {
>>> 401:     assert(value < FirstStartBits, "Offset into card would be truncated");
>> 
>> `value <= FirstStartBits` ?
>> 
>> Can/should replace (or augment, if you prefer) with a static assert using the maximum possible offset computed using card size and heap word size?
>
> (dynamic) may be also in `set_last_start`?

I like the idea of a static assert, will look into that.

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

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


More information about the shenandoah-dev mailing list