Integrated: 8353344: RISC-V: Detect and enable several extensions for debug builds
Fei Yang
fyang at openjdk.org
Mon Apr 7 07:23:54 UTC 2025
On Tue, 1 Apr 2025 04:56:01 GMT, Fei Yang <fyang at openjdk.org> wrote:
> Hi, please consider this small change.
> Support for some riscv extesions is in experimental status due to lack of hardware implementations.
> They won't be auto enabled at startup even through they could be detected through linux hwprobe syscall.
> And it's not that convenient to enable them on the command line and easy to snip away when doing regression test.
> To ensure they get some proper correctness test coverage, this turns on some of them for debug builds.
> This follows the order of linux hwprobe syscall macro definitions [1]. I can consider adding more if this makes sense.
> Manually tested on the command line with fastdebug build using qemu-system (running kernel-6.11).
>
> ubuntu at ubuntu:~/jdk$ java -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version | grep Zbkb
> bool UseZbkb = true {ARCH experimental} {default}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
>
> ubuntu at ubuntu:~/jdk$ java -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version | grep Zvbb
> bool UseZvbb = true {ARCH experimental} {default}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
>
> ubuntu at ubuntu:~/jdk$ java -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version | grep Zvkn
> bool UseZvkn = true {ARCH experimental} {default}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
>
> ubuntu at ubuntu:~/jdk$ java -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version | grep Zfa
> bool UseZfa = true {ARCH experimental} {default}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.ubuntu.jdk)
> OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp#L46-L82
This pull request has now been integrated.
Changeset: d1e91fcd
Author: Fei Yang <fyang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d1e91fcd620ce7e5527363dfa44543872f419c73
Stats: 25 lines in 1 file changed: 25 ins; 0 del; 0 mod
8353344: RISC-V: Detect and enable several extensions for debug builds
Reviewed-by: mli, fjiang, rehn
-------------
PR: https://git.openjdk.org/jdk/pull/24344
More information about the hotspot-runtime-dev
mailing list