RFR: 8366155: Serial: Obsolete PretenureSizeThreshold

Francesco Andreuzzi duke at openjdk.org
Tue Aug 26 13:37:35 UTC 2025


On Tue, 26 Aug 2025 13:32:34 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> src/hotspot/share/gc/serial/serialHeap.cpp line 286:
>> 
>>> 284: 
>>> 285: HeapWord* SerialHeap::expand_heap_and_allocate(size_t size, bool is_tlab) {
>>> 286:   HeapWord* result = _young_gen->allocate(size);
>> 
>> The order of `_young_gen->allocate` and `old_gen->expand_and_allocate` is reversed now. It used to be `_old_gen->expand_and_allocate == nullptr --> _young_gen->allocate`, now it's the other way around. Is that intended?
>
> On master, before the method is invoked, young-gen allocation is already attempted inside `attempt_allocation(size, is_tlab, false /*first_only*/);`.
> 
> With this cleanup, it become clearer that we try young-gen first, then old-gen. So, yes, this is intended.

Thanks for clarifying

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26941#discussion_r2301022598


More information about the hotspot-dev mailing list