RFR: 8352477: RISC-V: Print warnings when unsupported intrinsics are enabled
Fei Yang
fyang at openjdk.org
Thu Mar 20 03:54:40 UTC 2025
Hi, please consider this small change.
`UsePoly1305Intrinsics`, `UseMD5Intrinsics` and `UseSHA1Intrinsics` depend on `!AvoidUnalignedAccesses` and thus are unavailable on platforms with slow unaligned accesses. But these options could still be enabled on the command line, which I think could be suprising to our end users as these intrinsics will only have negative impact on performance numbers for such platforms. It seems to me more reasonable to print warnings and keep them disabled when enabled by the user on such platforms.
ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UseMD5Intrinsics -version
OpenJDK 64-Bit Server VM warning: Intrinsics for MD5 crypto hash functions not available on this CPU.
openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UsePoly1305Intrinsics -version
OpenJDK 64-Bit Server VM warning: Intrinsics for Poly1305 crypto hash functions not available on this CPU.
openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
ubuntu at premier-p550:~/jdk$ java -XX:+UnlockDiagnosticVMOptions -XX:+UseSHA1Intrinsics -version
OpenJDK 64-Bit Server VM warning: Intrinsics for SHA-1 crypto hash functions not available on this CPU.
openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (build 25-internal-adhoc.ubuntu.jdk)
OpenJDK 64-Bit Server VM (build 25-internal-adhoc.ubuntu.jdk, mixed mode, sharing)
-------------
Commit messages:
- 8352477: RISC-V: Print warnings when unsupported intrinsics are enabled
Changes: https://git.openjdk.org/jdk/pull/24123/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24123&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8352477
Stats: 17 lines in 1 file changed: 9 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/24123.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24123/head:pull/24123
PR: https://git.openjdk.org/jdk/pull/24123
More information about the hotspot-compiler-dev
mailing list