RFR: 8366155: Serial: Obsolete PretenureSizeThreshold
Francesco Andreuzzi
duke at openjdk.org
Tue Aug 26 12:54:34 UTC 2025
On Tue, 26 Aug 2025 11:44:35 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Remove obj-size checking before young/old-gen allocation -- an allocation succeeds iff there is enough free space.
>
> This simplifies the allocation logic:
> 1. before attempting gc: `mem_allocate_work` does young-gen allocation then old-gen-no-expansion allocation
> 2. after gc (still inside gc safepoint): `satisfy_failed_allocation` does young-gen allocation old-gen-with-expansion allocation
>
> Test: tier1-3
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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26941#discussion_r2300894601
More information about the hotspot-dev
mailing list