RFR: 8364628: Serial: Refactor SerialHeap::mem_allocate_work [v2]

Kim Barrett kbarrett at openjdk.org
Thu Aug 14 10:29:12 UTC 2025


On Wed, 13 Aug 2025 10:48:14 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Extract out old-gen allocation outside the critical-region to streamline the flow in `mem_allocate_work`.
>> 
>> Test: tier1-5
>
> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge branch 'master' into sgc-mem-allocate
>  - sgc-mem-allocate

src/hotspot/share/gc/serial/serialHeap.cpp line 312:

> 310:     if (!is_tlab) {
> 311:       // If it's too large for young-gen or heap is too full.
> 312:       if (size > heap_word_size(_young_gen->capacity_before_gc()) || _is_heap_almost_full) {

I'm not sure inlining (and removing now unused) helper `should_try_older_generation_allocation`
is an improvement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26619#discussion_r2276040325


More information about the hotspot-gc-dev mailing list