RFR: 8272773: Investigate making card table size configurable
Vishal Chand
github.com+10235864+vish-chan at openjdk.java.net
Fri Oct 8 08:35:15 UTC 2021
On Thu, 7 Oct 2021 11:05:41 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Hi,
>>
>> Please review the changes to make CardTable entry size configurable. The changes primarily consists of:
>>
>> 1. Addition of a cmdline flag **GCCardSizeInBytes** to make the card size startup time configurable.
>> 2. Setting the card size based on the flag in G1, Parallel and Serial GC memory initialization paths.
>> 3. Setting BlockOffsetTable size and ObjectStartArray size based on the card size.
>
> src/hotspot/share/gc/parallel/objectStartArray.cpp line 48:
>
>> 46: // size blocks as the card table.
>> 47: assert((int)block_size == (int)CardTable::card_size, "Sanity");
>> 48: assert((int)block_size <= 1024, "block_size must be less than or equal to 1024");
>
> The maximum of `1024` is derived from that we need an extra bit for possible offsets in the byte for backskip values (at least that's a hard limit). Please factor out a constant and comment it.
> Maybe for now, also check that card element size and offset table element size are equal (although they need not be, but the code may assume that).
What is meant by "factor out" a constant?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5838
More information about the hotspot-gc-dev
mailing list