RFR: 8377554: Load card table base and other values via AOTRuntimeConstants in AOT code [v4]
Vladimir Kozlov
kvn at openjdk.org
Tue Feb 24 19:39:39 UTC 2026
On Tue, 24 Feb 2026 18:33:13 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix header issue
>
> src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp line 150:
>
>> 148: #if INCLUDE_CDS
>> 149: if (AOTCodeCache::is_on_for_dump()) {
>> 150: __ movptr(rscratch, ExternalAddress(AOTRuntimeConstants::card_table_address()));
>
> Note that it seems like you are loading what we call the "card table base", which is not the same thing as the "card table address". The base is a shifted and biased number related to the address as an optimization trick, but is not dereferenceable, for example. The address is where the table starts (the address of the first byte of the card table).
I agree to rename the field to `AOTRuntimeConstants::_card_table_base;` and the address function to `AOTRuntimeConstants::card_table_base_address()` which returns the address of the field.
We should do the same in `ci/ciUtilities.*` files. Rename functions to `ci_card_table_base_*()`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29884#discussion_r2849175821
More information about the hotspot-dev
mailing list