RFR: 8371667: Shenandoah: Re-design alloc request type enum for better efficiency and cleaner code [v13]

Xiaolong Peng xpeng at openjdk.org
Tue Nov 18 06:59:13 UTC 2025


On Mon, 17 Nov 2025 23:38:27 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   tidy up
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1618:
> 
>> 1616:     orig_partition = ShenandoahFreeSetPartitionId::OldCollector;
>> 1617:   } else {
>> 1618:     request_generation = _heap->mode()->is_generational()? _heap->young_generation(): _heap->global_generation();
> 
> It took me some time to convince myself this is equivalent code, mainly because the original code (quite likely written by me) was so "clumsy".  Maybe a comment here would be helpful:
> 
> // This is a young collector gclab or shared allocation

I will add the comments, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28247#discussion_r2536554046


More information about the hotspot-gc-dev mailing list