RFR: 8364128: Improve gathering of cpu feature names using stringStream [v5]
Yudi Zheng
yzheng at openjdk.org
Thu Aug 14 07:40:28 UTC 2025
On Tue, 5 Aug 2025 18:08:22 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> This PR implements the code for cpu features names string using ~FormatBuffer~ stringStream. ~It also improves and extends FormatBuffer with an additional method that appends comma separated strings to the buffer.~ It also adds a method to stringStream that that appends separated strings separated by a delimiter to the buffer. This is useful in creating the cpu features names string.
>> This code will also be useful in Leyden to implement cpu feature check for AOTCodeCache [0].
>> Platforms affected: x86-64 and aarch64
>> Other platforms can be done if and when Leyden changes are ported to them.
>>
>> [0] https://github.com/openjdk/leyden/pull/84
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review comments
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
src/hotspot/cpu/aarch64/vm_version_aarch64.hpp line 148:
> 146:
> 147: enum Feature_Flag {
> 148: #define DECLARE_CPU_FEATURE_FLAG(id, name, bit) CPU_##id = bit,
It would be greatly appreciated if you could give the Graal devs a heads-up when changing CPU feature flags. JVMCI sees different CPU features with this change, and eventually leads to SIGILL by generating instruction not supported by the underlying CPU.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26515#discussion_r2275745777
More information about the hotspot-dev
mailing list