RFR: 8377507: Store cpu features in AOTCodeCache [v5]
Andrew Dinn
adinn at openjdk.org
Tue Feb 17 08:39:55 UTC 2026
On Sun, 15 Feb 2026 04:55:55 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> This PR adds the ability to cache and validate cpu features in the AOTCodeCache. It adds new APIs to `Abstract_VM_Version` to facilitate retrieval, storage and validation of cpu features between assembly phase and production run. Default implementation of these APIs is no-op. Each platform that supports AOTCodeCache can implement these APIs in the arch-specific `VM_Version` class.
>> This patch follows the Leyden premain implementation. It allows the cpu feature set of the production run to be a super-set of that of the assembly phase. This may change in future if we decide to that the cpu feature set should be the exact match.
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix bug in aarch64 implementation
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
Looks ok modulo the question about printing extra cpu features.
src/hotspot/share/code/aotCodeCache.cpp line 458:
> 456: VM_Version::store_cpu_features(runtime_cpu_features);
> 457: VM_Version::get_missing_features_name(runtime_cpu_features, cached_cpu_features_buffer, ss);
> 458: log.print_cr("Additional runtime CPU features: %s", ss.as_string());
Should we omit this when there are no extra features? i.e. the cached and runtime feature set is identical?
-------------
Marked as reviewed by adinn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29655#pullrequestreview-3812439493
PR Review Comment: https://git.openjdk.org/jdk/pull/29655#discussion_r2815620022
More information about the hotspot-dev
mailing list