RFR: 8352673: RISC-V: Vector can't be turned on with -XX:+UseRVV [v2]

duke duke at openjdk.org
Wed Mar 26 01:52:13 UTC 2025


On Mon, 24 Mar 2025 14:00:34 GMT, Dingli Zhang <dzhang at openjdk.org> wrote:

>> Hi all,
>> After [JDK-8348384](https://bugs.openjdk.org/browse/JDK-8348384), Vector can't be turned on with -XX:+UseRVV when Linux kernels before 6.8.5, which does not match the printed log:
>> 
>> log.info("Linux kernels before 6.8.5 (current %ld.%ld.%ld) have a known bug when using Vector and signals.", major, minor, patch);
>> log.info("Vector not enabled automatically via hwprobe, but can be turned on with -XX:+UseRVV.");
>> 
>> 
>> Testing on QEMU before this PR:
>> 
>> $ uname -a
>> Linux ubuntu 6.8.0-52-generic #53.1-Ubuntu SMP PREEMPT_DYNAMIC Sun Jan 26 04:38:25 UTC 2025 riscv64 riscv64 riscv64 GNU/Linux
>> 
>> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep UseRVV
>>      bool UseRVV                                   = false                             {ARCH diagnostic} {default}
>> openjdk version "25-internal" 2025-09-16
>> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
>> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
>> 
>> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -version | grep UseRVV
>> OpenJDK 64-Bit Server VM warning: RVV is not supported on this CPU
>>      bool UseRVV                                   = false                             {ARCH diagnostic} {command line}
>> openjdk version "25-internal" 2025-09-16
>> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
>> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
>> 
>> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:-UseRVV -version | grep UseRVV
>>      bool UseRVV                                   = false                             {ARCH diagnostic} {command line}
>> openjdk version "25-internal" 2025-09-16
>> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
>> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
>> 
>> $ ./java -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -Xlog:os=info -version
>> [0.021s][info][os] Use of CLOCK_MONOTONIC is supported
>> [0.022s][info][os] Use of pthread_condattr_setclock is supported
>> [0.022s][info][os] Relative timed-wait using pthread_cond_timedwait is associated with CLOCK_MONOTONIC
>> [0.022s][info][os] HotSpot is running with glibc 2.39, NPTL 2.39
>> [0.022s][info][os] Glibc stack size guard page adjustment is not needed
>> [0.024s][info][os] SafePoint Polling address, bad (protected) page:0x00007fff7fe66000, good (unprotected) page:0x00007fff7fe670...
>
> Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix the issue in vm_version_riscv.cpp

@DingliZhang 
Your change (at version 5c01052c34dc2d515fa9d6925a851724299bfc4e) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/24182#issuecomment-2753039305


More information about the hotspot-runtime-dev mailing list