RFR: 8368811: [Leyden] Use AOTRuntimeConstants table for card_table::_byte_map_base [v3]
    Vladimir Kozlov 
    kvn at openjdk.org
       
    Thu Oct  2 16:07:23 UTC 2025
    
    
  
> Currently we use `Relocation` info to patch `card_table::_byte_map_base` referenced in compiled code. This is not completely correct since this is not address. We currently have special check in `AOTCodeCache::init2()` to skip AOT code generation and usage if `byte_map_base` is not relocatable [aotCodeCache.cpp#L341](https://github.com/openjdk/leyden/blob/premain/src/hotspot/share/code/aotCodeCache.cpp#L341)
> 
> To avoid this we should use existing `AOTRuntimeConstants` table to load `byte_map_base` from it.
> 
> I also added few missing loads `card_shift` from `AOTRuntimeConstants` table. Actually I am not sure why we have it in `AOTRuntimeConstants` table.  From what I see, it is based on `GCCardSizeInBytes` flag [cardTable.cpp#L46](https://github.com/openjdk/leyden/blob/premain/src/hotspot/share/gc/shared/cardTable.cpp#L46) and never modified. The flags is not adjusted ergonomically.  So we can simple record the flag in AOT code configuration and verify it when loading AOT code. 
> 
> @adinn  what do you think about `card_shift` in `AOTRuntimeConstants` table? You added it there.
> 
> Changes were testing tier1-5.
Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
  Addressed comments
-------------
Changes:
  - all: https://git.openjdk.org/leyden/pull/102/files
  - new: https://git.openjdk.org/leyden/pull/102/files/e94fb605..469f5f7d
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=leyden&pr=102&range=02
 - incr: https://webrevs.openjdk.org/?repo=leyden&pr=102&range=01-02
  Stats: 3 lines in 2 files changed: 1 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/leyden/pull/102.diff
  Fetch: git fetch https://git.openjdk.org/leyden.git pull/102/head:pull/102
PR: https://git.openjdk.org/leyden/pull/102
    
    
More information about the leyden-dev
mailing list