RFR: Store cpu features in AOTCodeCache header [v3]
Vladimir Kozlov
kvn at openjdk.org
Fri Jul 18 17:19:51 UTC 2025
On Tue, 15 Jul 2025 21:20:36 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 incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>
> - 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>
> - Store cpu features in AOTCodeCache header
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
`src/hotspot/share/utilities/formatBuffer.hpp` changes should be done separately in mainline. And then ported into premain branch.
src/hotspot/share/code/aotCodeCache.cpp line 3249:
> 3247: SET_ADDRESS(_shared_blobs, SharedRuntime::polling_page_return_handler_blob()->entry_point());
> 3248: #ifdef COMPILER2
> 3249: SET_ADDRESS(_shared_blobs, SharedRuntime::polling_page_vectors_safepoint_handler_blob()->entry_point());
Mistake update?
-------------
PR Review: https://git.openjdk.org/leyden/pull/84#pullrequestreview-3034079818
PR Review Comment: https://git.openjdk.org/leyden/pull/84#discussion_r2216406638
More information about the leyden-dev
mailing list