RFR: 8275056: Virtualize G1CardSet containers over heap region [v2]

Thomas Schatzl tschatzl at openjdk.java.net
Wed Oct 27 12:06:13 UTC 2021


On Wed, 27 Oct 2021 08:17:34 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   32 bit compatibility - limit region size to 32M there as before. Fix test.
>
> src/hotspot/share/gc/g1/g1CardSet.cpp line 68:
> 
>> 66:   _bitmap_hash_mask = ~(~(0) << _log2_num_cards_in_howl_bitmap);
>> 67: 
>> 68:   // Heap region virtualization.
> 
> Maybe some more descriptive comment, something like: 
> Allow multiple card regions per heap region. This allows G1 to use larger heap regions without having to use a large integer type for the card index.

There is already a comment in the .hpp file about this, so I removed the comment.

> src/hotspot/share/gc/g1/g1CardSet.cpp line 71:
> 
>> 69:   _log2_card_region_per_heap_region = 0;
>> 70: 
>> 71:   uint bits_storable = G1CardSetContainer::LogCardsPerRegionLimit;
> 
> Any reason you really want this in a local variable instead of using `G1CardSetContainer::LogCardsPerRegionLimit` directly. If using a local I think the name should better match the constant.

The `G1CardSetContainer::LogCardsPerRegionLimit` identifier is too long imho :)

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

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



More information about the hotspot-gc-dev mailing list