RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2]

Xiaolong Peng xpeng at openjdk.org
Mon Feb 23 19:56:06 UTC 2026


On Wed, 11 Feb 2026 23:05:17 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1198:
>> 
>>> 1196: }
>>> 1197: 
>>> 1198: inline void ShenandoahRegionPartitions::assert_bounds_not_changed() {
>> 
>> One more suggestion.  Let's call this assert_bounds_sanity() and add a comment that says "this checks certain sanity conditions related to the bounds with much less effort than is required to more rigorously enforce correctness as is done by assert_bounds()."
>> 
>> Strictly, we are not really asserting that the bounds have not changed.
>
> Sure, I'll rename it and update the comment for the function, thanks.

Thanks, I have renamed the function and added comments as you suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2842757887


More information about the shenandoah-dev mailing list