RFR: 8345732: Provide helpers for using PartialArrayState [v4]

Kim Barrett kbarrett at openjdk.org
Wed Dec 18 19:01:39 UTC 2024


On Wed, 18 Dec 2024 18:04:32 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> The name log_set was chosen to suggest that it does "UL logging", and to
>> indicate that it is for dealing with a set of stats objects.  I think
>> print_stats loses both of those cues and is less clear because of that.
>
> Why is "set" more than important than "stats" in "set of stats objects"? If "UL logging" is critical, "log_stats" would be better. When I first read this name, I thought it's related to "set" as in "getter/setter" of log...

"stats" is redundent here.  Recall this is a static function. A client call is
going to look like `PartialArrayTaskStats::log_set(...)`, so it's already
obvious it's related to "stats" at the call site.

A value assigning function would have a "set_" prefix.  Using a "_set" suffix
for that would be really weird and non-idiomatic (and a reader would be quite
right to complain about such).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22622#discussion_r1890702759


More information about the hotspot-gc-dev mailing list