RFR: 8275055: Improve HeapRegionRemSet::split_card() [v3]

Thomas Schatzl tschatzl at openjdk.java.net
Tue Oct 19 09:49:53 UTC 2021


On Mon, 18 Oct 2021 17:40:36 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   sjohanss review2
>
> src/hotspot/share/gc/g1/heapRegionRemSet.inline.hpp line 67:
> 
>> 65:   uintptr_t offset = pointer_delta(from, _heap_base_address, 1);
>> 66:   card_region = offset >> _split_card_shift;
>> 67:   card_within_region = (offset & _split_card_mask) >> CardTable::card_shift;
> 
> Maybe assert that the narrowing conversion is ok.

If fixed this by adding code in `HeapRegionRemSet::initialize()`. This should be sufficient vs. checking every time.

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

PR: https://git.openjdk.java.net/jdk/pull/5895



More information about the hotspot-gc-dev mailing list