RFR: 8368104: Parallel: Refactor PSThreadRootsTaskClosure [v2]
Stefan Karlsson
stefank at openjdk.org
Fri Sep 19 20:42:22 UTC 2025
On Fri, 19 Sep 2025 18:31:48 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/parallel/psScavenge.cpp line 295:
>>
>>> 293: {
>>> 294: PSScavengeRootsClosure root_closure(pm);
>>> 295: _oop_storage_strong_par_state.oops_do(&root_closure);
>>
>> The pm variable isn't local to this scope anymore so it would probably be nicer to move the following part out of the scope:
>>
>> // Do the real work
>> pm->drain_stacks(false);
>
> Well, it's there to be consistent with other kinds of roots -- old-to-young pointers, inside `scavenge_roots_work`, and `thread_closure`.
Ahh. I see now.
Would you mind adding a blank line so that the formatting is consistent:
PSScavengeRootsClosure root_closure(pm);
_oop_storage_strong_par_state.oops_do(&root_closure);
// Do the real work
pm->drain_stacks(false);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27393#discussion_r2364486008
More information about the hotspot-gc-dev
mailing list