RFR: 8319373: Serial: Refactor dirty cards scanning during Young GC [v10]
Albert Mingkun Yang
ayang at openjdk.org
Tue Nov 21 14:20:11 UTC 2023
On Tue, 21 Nov 2023 07:50:35 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> It's for "iterator".
>
> I don't think I would have ever guessed that, which suggests it might not be an ideal naming choice.
My concern regarding `cur_card` is that there is no contrasting `prev_` or `next_` in this context. The sole message I want to convey here is that we are iterating through cards. Using the conventional loop variable `i` plus `card` seems like the most natural approach, in my opinion. It is concise, so it doesn't introduce much overhead despite its frequent occurrence in the context. Therefore, I prefer the current name. By the way, the same style and convention are also employed in other methods in this PR. Additionally, similar naming conventions can be found in the already merged code of Parallel (`PSCardTable`) and G1 (`G1ScanHRForRegionClosure`).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16492#discussion_r1400670786
More information about the hotspot-gc-dev
mailing list