RFR: 8364516: Serial: Move class unloading logic inside SerialFullGC::invoke_at_safepoint

Thomas Schatzl tschatzl at openjdk.org
Fri Aug 1 09:29:56 UTC 2025


On Fri, 1 Aug 2025 09:24:30 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Encapsulating classunloading logic inside `invoke_at_safepoint` and adding doc explaining why the classunloading logic can't be placed at the end of marking during full-gc, like other STW collectors.
>> 
>> Test: tier1-3
>
> src/hotspot/share/gc/serial/serialFullGC.cpp line 713:
> 
>> 711:   // Therefore, we declare classunloading context in the same level as various
>> 712:   // phases, and purge dead classes (invoking ClassLoaderDataGraph::purge)
>> 713:   // after all phases of full-gc.
> 
> Suggestion:
> 
>   // phases, and purge dead classes (invoking ClassLoaderDataGraph::purge())
>   // after the other phases of full-gc.

Not sure why "full gc" has a hyphen in the middle but I guess that's done elsewhere too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26588#discussion_r2247437619


More information about the hotspot-gc-dev mailing list