RFR: 8322296: Introduce CardWord for word iteration on CardTable [v2]
Kim Barrett
kbarrett at openjdk.org
Fri Dec 22 01:28:48 UTC 2023
On Thu, 21 Dec 2023 21:40:17 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/serial/cardTableRS.cpp line 365:
>>
>>> 363: // Word comparison
>>> 364: while (current_card + sizeof(CardWord) <= end_card) {
>>> 365: CardWord* current_word = reinterpret_cast<CardWord*>(current_card);
>>
>> When the idea of something like CardWord was suggested, a named accessor to package this was part
>> of that suggestion.
>
> I find that too "caller-specific" to be included inside `CardTable`. Creating an abstraction here breaks the flow, so I kept it as is.
CardTable is providing CardWord and is_word_aligned (or whatever it gets called), so a function for
obtaining a CardWord from the CardTable seems entirely reasonable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17144#discussion_r1434633366
More information about the hotspot-gc-dev
mailing list