<div dir="auto">Commenting from a user perspective, since we very much want to ship AOT caches for JRuby users...<div dir="auto"><br></div><div dir="auto">The restriction seems fine largely because I don't know how else you'd work around it. But I think with this restriction there needs to be a clear way to AOT for a lowest common denominator without having that exact hardware on hand. I don't want to have to find some janky old x86 machine to train a portable cache on.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jan 22, 2026, 20:05 Vladimir Kozlov <<a href="mailto:vladimir.kozlov@oracle.com">vladimir.kozlov@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I would like to get opinion from community regarding AOT code usage <br>
restrictions for JEP <a href="https://openjdk.org/jeps/8335368" rel="noreferrer noreferrer" target="_blank">https://openjdk.org/jeps/8335368</a>.<br>
<br>
For current AOT features in JDK 25 and 26 it is not the issue - CPU <br>
features do not affect them.<br>
<br>
CPU features affect generated AOT code - the instructions set is defined <br>
by machine on which AOT training is done. But CPU instructions on <br>
machine where AOT cache is used could be different.<br>
<br>
Our current proposal is next:<br>
<br>
1. The best startup and peak performance with AOT code could be achieved <br>
when training and production runs use the same type of machines (same <br>
CPU and OS).<br>
<br>
2. AOT code will not be used if CPU features on machine for production <br>
run does not match one used for training. Other AOT features (cached <br>
classes and profiling info) will still be used.<br>
<br>
3. In a future, when user requested during training run (with VM's <br>
flag[s]), we will allow to use AOT code generated for old CPU <br>
instructions (for example, AVX2) on machines with new instructions (for <br>
example, AVX512) by restricting online (normal JIT) code generation to <br>
old CPU instructions. This will allow to use the same cached AOT code on <br>
variety of machines. But you may not get the best peak performance on <br>
newer machines.<br>
<br>
What do you think about this proposal?<br>
<br>
Thanks,<br>
Vladimir K<br>
<br>
</blockquote></div>