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:36:15 UTC 2025
On Mon, 17 Nov 2025 16:15:49 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:
>> 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.
I have removed them, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28247#discussion_r2534768149
More information about the hotspot-gc-dev
mailing list