RFR: 8368740: Serial: Swap eden and survivor spaces position in young generation [v2]
Albert Mingkun Yang
ayang at openjdk.org
Mon Sep 29 07:37:19 UTC 2025
On Mon, 29 Sep 2025 06:54:39 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review
>
> src/hotspot/share/gc/serial/defNewGeneration.cpp line 478:
>
>> 476:
>> 477: // Keep from/to and expand eden.
>> 478: expand_eden_by(_virtual_space.uncommitted_size());
>
> Just expanding eden space may go against the option `SurvivorRatio`.
Indeed; this happens when young-gen is still not empty after full-gc -- this is kind of an extreme scenario. Given there can be live objs inside survivor/eden, the only safe way to expand is to expand eden, as it's the final space in the new layout.
Consequently, `DefNewGeneration::max_capacity` is updated to ensure `capacity <= max_capacity`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27513#discussion_r2386982306
More information about the hotspot-gc-dev
mailing list