Integrated: 8373056: Shenandoah: Remove unnecessary use of ShenandoahAllocRequest.type()

Xiaolong Peng xpeng at openjdk.org
Thu Dec 4 23:59:16 UTC 2025


On Wed, 3 Dec 2025 23:02:17 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

> Follow up on the feedback/comments on PR https://github.com/openjdk/jdk/pull/28521 for bug [JDK-8372566](https://bugs.openjdk.org/browse/JDK-8372566), we should avoid using ShenandoahAllocRequest.type() directly if possible, in most of cases we don't need to directly use alloc type, the inline member methods provided by ShenandoahAllocRequest should be sufficient.
> 
> In the PR, I have removed most of the places where ShenandoahAllocRequest.type() directly used, there will be only one place left after the change:
> * ShenandoahFreeSet::allocate (This one will be removed with PR https://github.com/openjdk/jdk/pull/26171)
> 
> Also did small code rearrangement for ShenandoahOldGeneration::configure_plab_for_current_thread 
> 
> ### Test
> - [x] hotspot_gc_shenandoah
> - [x] GHA

This pull request has now been integrated.

Changeset: 15f25389
Author:    Xiaolong Peng <xpeng at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/15f25389435288881644f7aeab48fd2eae410999
Stats:     80 lines in 6 files changed: 12 ins; 21 del; 47 mod

8373056: Shenandoah: Remove unnecessary use of ShenandoahAllocRequest.type()

Reviewed-by: wkemper, kdnilsen

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

PR: https://git.openjdk.org/jdk/pull/28649


More information about the shenandoah-dev mailing list