RFR: 8353344: RISC-V: Detect and enable several extensions for debug builds
Robbin Ehn
rehn at openjdk.org
Mon Apr 7 06:13:53 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
Ok, sure, thanks!
-------------
Marked as reviewed by rehn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24344#pullrequestreview-2745614347
More information about the hotspot-runtime-dev
mailing list