RFR: 8328573: Add ASSERT macro and not use 'CardTable::card_shift_in_words' in 'G1BlockOffsetTable::check_index'

Guoxiong Li gli at openjdk.org
Wed Mar 20 18:11:26 UTC 2024


On Wed, 20 Mar 2024 17:46:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp line 75:
>> 
>>> 73:   inline void set_offset_array(size_t left, size_t right, u_char offset);
>>> 74: 
>>> 75: #ifdef ASSERT
>> 
>> I disagree with this change - it is common usage to use the `NOT_DEBUG_RETURN` or similar macros to hide the `#ifdef`s.
>> The `#ifdef`s only clutter the code for no gain as you can see.
>
> I agree with @tschatzl - don't make this and related parts of the change.

Got it. Thanks for your explanation and guide.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18391#discussion_r1532572302


More information about the hotspot-gc-dev mailing list