RFR: Store cpu features in AOTCodeCache header [v5]
Ashutosh Mehra
asmehra at openjdk.org
Wed Jul 23 22:15:15 UTC 2025
On Wed, 23 Jul 2025 22:07:32 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> This is the initial version of storing cpu features in the AOTCodeCache to verify runtime env has the same cpu capabilities as the assembly env. It covers both x86 and aarch64.
>> AOTCodeCache header is updated to store the cpu features in arch-dependent form (although its same for currently supported architectures - x86 and aarch64).
>>
>> It also fixes a bug - the `polling_page_vectors_safepoint_handler_blob` can be null if AVX is not present on a system. This causes crash as this blob's entry point is stored in the address table.
>> I came across this when I did the assembly run with -XX:UseAVX=0 option.
>
> Ashutosh Mehra has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
>
> - Merge branch 'premain' into aot-cache-feature-flags
> - Add test to check cpu feature incompatibility
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Ignore CPU_HT when storing cpu features in AOTCodeCache
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Fix formatting of log messages
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Restore changes deleted by mistake
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Use FormatBuffer to obtain cpu features names string
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Merge branch 'premain' into aot-cache-feature-flags
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Remove UseSSE and UseAVX checks
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Merge branch 'premain' into aot-cache-feature-flags
> - Address review comments
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - ... and 1 more: https://git.openjdk.org/leyden/compare/a529aa73...5f872c11
I added a test to check cpu feature flag incompatibility. For now it is specific to x86_64. I also removed CPU_HT flag from the VM_Features stored in the AOTCodeCache, as this flag should not affect the instruction set used for code gen.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/84#issuecomment-3110567612
More information about the leyden-dev
mailing list