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

Xiaolong Peng xpeng at openjdk.org
Wed Feb 11 23:08:07 UTC 2026


On Wed, 11 Feb 2026 22:58:25 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add assert_bounds_not_changed as Kelvin suggested
>
> 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.

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

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


More information about the hotspot-gc-dev mailing list