RFR: 8324649: Shenandoah: refactor implementation of free set [v39]
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Apr 16 00:41:06 UTC 2024
On Wed, 10 Apr 2024 11:31:43 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove debugging instrumentation
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 102:
>
>> 100: } else if (trailing_ones == bits_to_examine) {
>> 101: // Tail recursion
>> 102: return is_forward_consecutive_ones(start_idx + bits_to_examine, count - bits_to_examine);
>
> How bad can this get? I haven't analyzed the algorithm, but if this is not bounded (e.g. we know that it can only go 1 level deep), then I'd prefer to have this as loop, to avoid stack overflow. Same applies for a few other places.
I've replace tail recursion with iteration. Thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1566576781
More information about the shenandoah-dev
mailing list