RFR: 8327571: Parallel: Remove redundant operation in PSParallelCompact::clear_data_covering_space
Albert Mingkun Yang
ayang at openjdk.org
Thu Mar 7 13:52:52 UTC 2024
On Thu, 7 Mar 2024 13:39:39 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Simple removing redundant code.
>
> src/hotspot/share/gc/parallel/psParallelCompact.cpp line 901:
>
>> 899:
>> 900: const idx_t beg_bit = _mark_bitmap.addr_to_bit(bot);
>> 901: const idx_t end_bit = _mark_bitmap.addr_to_bit(top);
>
> The method `addr_to_bit` invokes the method `words_to_bits`, so the result is always aligned. Is my understanding right?
Don't think so. The alignment is about `#bits % BitsPerWord == 0`. `clear_range` does not require alignment. (You can try `assert(_mark_bitmap.align_range_end(end_bit) == end_bit, "inv");`, and that should fail.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18152#discussion_r1516186857
More information about the hotspot-gc-dev
mailing list