RFR: 8329096: G1: Change the type of G1BlockOffsetTable::_offset_base to uint8_t* [v2]
Guoxiong Li
gli at openjdk.org
Wed Mar 27 09:10:40 UTC 2024
On Wed, 27 Mar 2024 08:48:14 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use UINT8_MAX. Remove unnecessary white space.
>
> src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp line 111:
>
>> 109: "Offset card has an unexpected value");
>> 110: uint8_t* start_card_for_region = start_card;
>> 111: uint8_t offset = max_jubyte;
>
> Pre-existing: That should probably be `UINT8_MAX` from stdint/cstdint.h (should already be included).
Fixed.
> src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp line 93:
>
>> 91: assert(_reserved.contains(p),
>> 92: "out of bounds access to block offset table");
>> 93: uint8_t* result = const_cast<uint8_t *>(&_offset_base[uintptr_t(p) >> CardTable::card_shift()]);
>
> Pre-existing:
> Suggestion:
>
> uint8_t* result = const_cast<uint8_t*>(&_offset_base[uintptr_t(p) >> CardTable::card_shift()]);
Fixed. And I polished the same problem in `g1BlockOffsetTable.cpp` too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18502#discussion_r1540712440
PR Review Comment: https://git.openjdk.org/jdk/pull/18502#discussion_r1540712772
More information about the hotspot-gc-dev
mailing list