RFR: 8360206: Refactor ReferenceProcessor::balance_queues [v2]
Albert Mingkun Yang
ayang at openjdk.org
Thu Jun 26 09:40:17 UTC 2025
On Thu, 26 Jun 2025 06:35:24 GMT, Sangheon Kim <sangheki 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 two additional commits since the last revision:
>>
>> - Merge branch 'master' into ref-refactor
>> - ref-refactor
>
> src/hotspot/share/gc/shared/referenceProcessor.cpp line 652:
>
>> 650: if (to_len >= avg_refs) {
>> 651: // this list is full enough; move on to next
>> 652: to_idx++;
>
> As you will keep line 647 assert, keeping '(to_idx + 1) % _num_queues' will make safer?
It's safer in the sense of suppressing potential errors. The `%` should be redundant -- if it's required to not fail, it's actually a bug and I'd prefer it fails fast. (I have run it through tier1-5, and we are at the very beginning of jdk26, so should be plenty of time for testing/fixing.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25930#discussion_r2168617315
More information about the hotspot-gc-dev
mailing list