RFR: 8377554: Load card table base and other values via AOTRuntimeConstants in AOT code

Vladimir Kozlov kvn at openjdk.org
Tue Feb 24 06:01:37 UTC 2026


On Mon, 23 Feb 2026 16:59:53 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> Generated stubs and nmethods embed some runtime-derived constants, such as the card table base, directly into code as instruction operands. AOT code generation cannot rely on these constants being valid between the assembly run and a production run and adjusting the constants at load time is not currently supported. So, instead AOT generation must employ code which loads the constants from a table whose address can be relocated at load time.

src/hotspot/share/code/aotCodeCache.cpp line 1814:

> 1812: }
> 1813: 
> 1814: AOTRuntimeConstants AOTRuntimeConstants::_aot_runtime_constants;

Look on recent fix I pushed for this part of code:
https://github.com/openjdk/leyden/commit/10172534fc92bc58dcf7eae6145c781ec50ffabc#diff-516c8850de2f959cdbecfcd27e402ad72795ff3106759896566fa78c41f59794R3821-R3853

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29884#discussion_r2844690567


More information about the hotspot-dev mailing list