RFR: 8345732: Provide helpers for using PartialArrayState [v3]
Kim Barrett
kbarrett at openjdk.org
Tue Dec 17 17:19:38 UTC 2024
On Tue, 17 Dec 2024 15:13:33 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Kim Barrett 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 eight additional commits since the last revision:
>>
>> - Merge branch 'master' into pa-splitter
>> - rename splitter.step() => claim()
>> - simplify comments
>> - Merge branch 'master' into pa-splitter
>> - parallel uses PartialArraySplitter
>> - g1 uses PartialArraySplitter
>> - add PartialArraySplitter
>> - add PartialArrayTaskStats
>
> src/hotspot/share/gc/shared/partialArrayTaskStats.hpp line 77:
>
>> 75: void inc_pushed(size_t n = 1) { _pushed += n; }
>> 76: void inc_stolen(size_t n = 1) { _stolen += n; }
>> 77: void inc_processed(size_t n = 1) { _processed += n; }
>
> I skimmed through callers of these, but can't find a strong reason to use default-arg-value here. Will there be more call-sites that justify this usage?
Currently, inc_pushed needs an argument while others don't. Given this stats object is likely
mostly encapsulated in and modified by the splitter object, that might always be the case for these
functions. Though consistency has some benefit, maybe not here? I'll wire in the usage, and we
can adjust later if needed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22622#discussion_r1888919697
More information about the hotspot-gc-dev
mailing list