RFR: 8322296: Introduce CardWord for word iteration on CardTable [v2]
Albert Mingkun Yang
ayang at openjdk.org
Thu Dec 21 21:43:16 UTC 2023
On Thu, 21 Dec 2023 21:13:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - review
>> - Merge branch 'master' into card-word
>> - card-word
>
> src/hotspot/share/gc/g1/g1RemSet.cpp line 559:
>
>> 557:
>> 558: CardValue* find_first_dirty_card(CardValue* i_card) const {
>> 559: while (!CardTable::is_word_aligned(i_card)) {
>
> pre-existing: This loop assumes initial i_card < _end_card and _end_card is word aligned. Should be
> asserted. Similarly in find_first_non_dirty_card.
It's asserted in the constructor.
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17144#discussion_r1434532937
PR Review Comment: https://git.openjdk.org/jdk/pull/17144#discussion_r1434534227
More information about the hotspot-gc-dev
mailing list