RFR: 8322296: Introduce CardWord for word iteration on CardTable

Kim Barrett kbarrett at openjdk.org
Thu Dec 21 21:22:51 UTC 2023


On Wed, 20 Dec 2023 10:42:33 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Simple adding a new type for card-word in `CardTable` in order to avoid repeating the same logic/typedef in card based collectors.
>
> src/hotspot/share/gc/shared/cardTable.hpp line 75:
> 
>> 73:   };
>> 74: 
>> 75:   static const CardWord clean_card_word = (CardWord)(-1);
> 
> I would somewhat (not strongly) prefer if this constant explicitly constructed this value out of `clean_card` values. Or some static assert that the value is as expected.
> Maybe this is not worth the effort though.

I agree with @tschatzl here.  A static assert would be sufficient.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17144#discussion_r1434509695


More information about the hotspot-gc-dev mailing list