RFR: Store cpu features in AOTCodeCache header
Andrew Dinn
adinn at openjdk.org
Tue Jul 8 10:55:04 UTC 2025
On Mon, 7 Jul 2025 16:18:05 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
>> Could you provide more detail about your statement "some features presence affect ABI of the JIT-compiled code"?
>
> Simply said if you store the compiled Java code on old CPU (almost no features) and then run it on new CPU (full features) then it will crash. It crashes when a newly compiled code calls the restored code or vice versa. If you disagree I can try to reproduce with Leyden, it was happening with CRaC.
@jankratochvil I'm not disagreeing - merely wanting to see where CRaC goes wrong and why (noting that it is a slightly different circumstance to the AOT Cache case).
My preferred position would be that there /ought not/ to be any issues reusing code generated during the AOT Cache assembly phase in the absence of some given feature in combination with with code generated in a production run where that feature is present i.e. that that any incompatibility would constitute an error in the code generation scheme. I'd be very interested in any evidence you can provide to show that 1) such a code generation error exists or, worse, 2) my preference is unrealizable.
-------------
PR Review Comment: https://git.openjdk.org/leyden/pull/84#discussion_r2192155973
More information about the leyden-dev
mailing list