RFR: Store cpu features in AOTCodeCache header [v2]

Andrew Haley aph at openjdk.org
Tue Jul 15 13:05:00 UTC 2025


On Tue, 15 Jul 2025 11:10:34 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> @ashu-mehra I don't recall that, but don't have too much personal experience switching the CPU between runs.
>> 
>> One issue that could do trouble is the hyperthreading support; I have one of those hybrid Intels with performance and efficiency cores. HT flag is on on the performance cores, and when you record the features on perf core and try to restore on Atom, a straightforward bitwise comparison would error, even though HT is not something the generated code usually relies on.
>
>> 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.
> 
> Yes. In fact, I'd call any failure to use a feature "a bug" that we ought to look at. At best it's a code smell. As one of Arthur C Clarke's editors once put it, CH3CH2SH.

Sorry, that was badly worded. It's never _compulsory_ to use any feature, and if any code makes the  assumption that if a feature is supported and turned on then it must be used, then that code has a bug.

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

PR Review Comment: https://git.openjdk.org/leyden/pull/84#discussion_r2207418339


More information about the leyden-dev mailing list