RFR: 8361055: Serial: Inline SerialHeap::process_roots
Stefan Karlsson
stefank at openjdk.org
Mon Jun 30 08:59:40 UTC 2025
On Mon, 30 Jun 2025 08:25:09 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Refactor roots processing in Serial (young-gc and full-gc) to clean up the control-flow and make is clearer what roots and closures are used in each context.
>
> Test: tier1-8
Changes requested by stefank (Reviewer).
src/hotspot/share/gc/serial/defNewGeneration.cpp line 619:
> 617:
> 618: _old_gen->scan_old_to_young_refs(_old_gen->space()->top());
> 619: // During young-gc, visit all (strong+weak) clds with the same closure.
Suggestion:
_old_gen->scan_old_to_young_refs(_old_gen->space()->top());
// During young-gc, visit all (strong+weak) clds with the same closure.
I also wonder if the previous placement of `scan_old_to_young_refs` after the other roots were intentional and this PR changes that?
src/hotspot/share/gc/serial/serialFullGC.cpp line 492:
> 490: true);
> 491:
> 492: ClassLoaderDataGraph::always_strong_cld_do(&follow_cld_closure);
The old code treated `!ClassUnloading` differently. It's not clear to me why this change is correct.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26038#pullrequestreview-2970440186
PR Review Comment: https://git.openjdk.org/jdk/pull/26038#discussion_r2174571747
PR Review Comment: https://git.openjdk.org/jdk/pull/26038#discussion_r2174574043
More information about the hotspot-gc-dev
mailing list