RFR: 8319373: Serial: Refactor dirty cards scanning during Young GC [v2]
Thomas Schatzl
tschatzl at openjdk.org
Fri Nov 10 10:19:12 UTC 2023
On Fri, 10 Nov 2023 09:08:48 GMT, Thomas Schatzl <tschatzl 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 s1-young-gc
>> - s1-young-gc
>
> src/hotspot/share/gc/serial/cardTableRS.cpp line 417:
>
>> 415: }
>> 416:
>> 417: // final card occupied by this obj
>
> Suggestion:
>
> // Final card occupied by this obj. We can use this to return and continue our search because this object is imprecisely marked and is always looked at for references as a whole anyway.
I think this method should be renamed, its name is misleading. Or it should have additional documentation. It does not find the first clean card, but the first clean card after the recently processed object.
Also the `objArray` exception should be documented, see my suggestions, but it is maybe better to collect this information at the top.
I.e. in this case
Heap | ObjectVeryLong |
Cards | x | | | x | | |
x = dirty card
the method does not find the first clean card (the second card), but the last card covering the object (assuming it's not aligned).
This is not a problem because the caller cleans up the extra dirty marks, but still it is surprising.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16492#discussion_r1389165921
More information about the hotspot-gc-dev
mailing list