RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v20]
Xiaolong Peng
xpeng at openjdk.org
Thu Jan 8 20:01:29 UTC 2026
On Tue, 6 Jan 2026 01:21:21 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 265 commits:
>>
>> - Merge branch 'openjdk:master' into cas-alloc-1
>> - Fix build error after merging from tip
>> - Merge branch 'master' into cas-alloc-1
>> - Merge branch 'master' into cas-alloc-1
>> - Some comments updates as suggested in PR review
>> - Fix build failure after merge
>> - Expend promoted from ShenandoahOldCollectorAllocator
>> - Merge branch 'master' into cas-alloc-1
>> - Address PR comments
>> - Merge branch 'openjdk:master' into cas-alloc-1
>> - ... and 255 more: https://git.openjdk.org/jdk/compare/de81d389...cf13b7b5
>
> src/hotspot/share/gc/shenandoah/shenandoahAllocator.hpp line 79:
>
>> 77: int refresh_alloc_regions(ShenandoahAllocRequest* req = nullptr, bool* in_new_region = nullptr, HeapWord** obj = nullptr);
>> 78: #ifdef ASSERT
>> 79: virtual void verify(ShenandoahAllocRequest& req) { }
>
> Need a comment to explain what verify does. Is this simply checking to make sure the req is "properly formatted"? I think the intention is to enforce that req affiliation corresponds to ALLOC_PARTITION. Would be good to clarify this in the comment.
>
> Do we need this to be virtual? It seems like a single templated implementation would suffice.
Yes, it can be templated implementation, I'll update the implementation to use template.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26171#discussion_r2673695164
More information about the hotspot-gc-dev
mailing list