RFR: 8324649: Shenandoah: replace implementation of free set [v53]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon May 6 22:04:06 UTC 2024
On Fri, 3 May 2024 16:07:43 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 114 commits:
>>
>> - Merge remote-tracking branch 'origin/master' into restructure-free-set
>> - Merge branch 'openjdk:master' into master
>> - Merge branch 'openjdk:master' into master
>> - Remove unnecessary call to update_watermark
>> - Assert progress on find_next and find_prev
>> - Simplify partition_membership_name by code reuse
>> - Simplify by combining implemnetations of shrink_interval functions
>> - Fix NumPartition type
>>
>> Beautify the code by changing type of NumPartitions and adding Int and
>> UInt forms of NumPartitions.
>> - Refinements to support zero-build compiles
>> - Fix whitespace
>> - ... and 104 more: https://git.openjdk.org/jdk/compare/a863ef5d...d6e3546c
>
> src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.cpp line 52:
>
>> 50: if ((element_bits & mask) == mask) {
>> 51: size_t counted_ones = BitsPerWord - bit_number;
>> 52: return counted_ones + count_leading_ones(start_idx - counted_ones);
>
> If you have a long string of 1s, then recursively calling itself might blow up the stack. I guess writing it in an iterative way might be better (and perhaps perform better).
Thanks. Replacing recursion with iteration.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1591600333
More information about the hotspot-gc-dev
mailing list