RFR: 8371667: Shenandoah: Re-design alloc request type enum for better efficiency and cleaner code [v10]
Xiaolong Peng
xpeng at openjdk.org
Mon Nov 17 16:18:32 UTC 2025
On Mon, 17 Nov 2025 09:48:57 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> _alloc_plab is also lab alloc
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1612:
>
>> 1610: assert(req.type() == ShenandoahAllocRequest::_alloc_tlab ||
>> 1611: req.type() == ShenandoahAllocRequest::_alloc_shared ||
>> 1612: req.type() == ShenandoahAllocRequest::_alloc_cds, "Must be one of the mutator alloc types.");
>
> Are these asserts tautological? Meaning, we have just checked `is_mutator_alloc()` or `is_old()` -- surely we rely them to be typed well?
Kind of, I'll remove them from here and some other places.
I added these just in case some of the types are not encoded well, e.g. when people want to add a new type and change the encodings.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28247#discussion_r2534707230
More information about the hotspot-gc-dev
mailing list