RFR: 8358546: [premain] AOT code generation should support UseCompactObjectHeaders [v2]
Vladimir Kozlov
kvn at openjdk.org
Fri Jun 6 14:42:47 UTC 2025
> COH testing was added to tier3 which we use in premain branch testing. And we noticed that `runtime/cds/appcds/aotCode/` tests crashes during "production" run when UseCompactObjectHeaders is on.
>
> There were five issues when AOT code is generated with COH:
> - missing CompressedKlassPointers::base() relocation on x86 in `MacroAssembler::decode_and_move_klass_not_null()`
> - missing CKP:base() relocation on aarch64 in `MacroAssembler::cmp_klass()` because `decode_klass_not_null_for_aot()` was not called
> - On aarch64 full AOT encoding/decoding code for compressed klass pointers was generated even when base is NULL. Do special AOT code only when base is not NULL, similar to code on x64.
> - Record CKP::basse in AOT code cache configuration and check it on load similar to what we do for compressed oops base.
> - Prototype header value for new allocated object is embedded into C2 generated code as constant. But with COH the prototype also contains encoded class. This class encoding (and prototype header) could be change when CDS store this information in archive. We need to load it in code.
>
> Tested tier1-3
Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
Ignore AOT code cache when compressed oop or klass bases are different
-------------
Changes:
- all: https://git.openjdk.org/leyden/pull/78/files
- new: https://git.openjdk.org/leyden/pull/78/files/797baefb..30f9934f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=leyden&pr=78&range=01
- incr: https://webrevs.openjdk.org/?repo=leyden&pr=78&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/leyden/pull/78.diff
Fetch: git fetch https://git.openjdk.org/leyden.git pull/78/head:pull/78
PR: https://git.openjdk.org/leyden/pull/78
More information about the leyden-dev
mailing list