[jdk17u-dev] RFR: 8329823: RISC-V: Need to sync CPU features with related JVM flags

Gui Cao gcao at openjdk.org
Wed Apr 10 10:23:20 UTC 2024


Hi, The same issue also exists in the  jdk17u-dev. I would like to backport [8329823](https://bugs.openjdk.org/browse/JDK-8329823) to jdk17u-dev. With this backport,  We synchronize these features with related JVM flags so that "features" string can reflect actual usable CPU features. This is a risc-v specific change. Backport is clean, risk is low.

### Testing

- [x]  Run tier1 tests on SOPHON SG2042 (release)

Results without specifying any jvm flags(After applying this patch)

----------System.out:(4/135)----------
WB.getCPUFeatures(): "rv64 i m a f d c"
CPUInfo.getAdditionalCPUInfo(): ""
CPUInfo.getFeatures(): [rv64, i, m, a, f, d, c]
TEST PASSED


Results with specifying -XX:-UseRVC (After applying this patch)

----------System.out:(4/130)----------
WB.getCPUFeatures(): "rv64 i m a f d"
CPUInfo.getAdditionalCPUInfo(): ""
CPUInfo.getFeatures(): [rv64, i, m, a, f, d]
TEST PASSED

Results with specifying -XX:+UseRVC (After applying this patch)

----------System.out:(4/135)----------
WB.getCPUFeatures(): "rv64 i m a f d c"
CPUInfo.getAdditionalCPUInfo(): ""
CPUInfo.getFeatures(): [rv64, i, m, a, f, d, c]
TEST PASSED

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

Commit messages:
 - Backport 8329823: RISC-V: Need to sync CPU features with related JVM flags

Changes: https://git.openjdk.org/jdk17u-dev/pull/2385/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2385&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8329823
  Stats: 29 lines in 2 files changed: 18 ins; 2 del; 9 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/2385.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2385/head:pull/2385

PR: https://git.openjdk.org/jdk17u-dev/pull/2385


More information about the jdk-updates-dev mailing list