RFR: 8319373: Serial: Refactor dirty cards scanning during Young GC [v10]

Thomas Schatzl tschatzl at openjdk.org
Fri Nov 24 08:45:07 UTC 2023


On Wed, 22 Nov 2023 09:22:24 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> I concur with Kim and would like to ask to rename these variables to use the `cur_` prefix as is much more common. I do not see a connection of `cur` with linked list prev/next pointers; in the previous recent PRs that introduced this naming I (in hindsight wrongly) did not speak up because although I did not like it, nobody else objected either.
>
> I think "cur" is a frequently used naming convention for iteration, irrespective of there being related
> "prev" or "next".  I don't like the similar naming in those other places you mention either.  Like I said,
> "i" usually indicates an integral/index variable, and using it otherwise is (at least to me) confusing.

Given that there is now a strong objection to this naming style, and I did not really like the `i_` prefix in the other CRs either but did not speak up, I suggest we just use the existing common `cur_` prefix here. From my point of view there is no relation of `cur_` to `prev`/`next` either.

The other uses can be fixed up separately.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16492#discussion_r1404055869


More information about the hotspot-gc-dev mailing list