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

Gui Cao gcao at openjdk.org
Wed Apr 10 08:14:35 UTC 2024


Hi, The same issue also exists in the  jdk22u. I would like to backport [8329823](https://bugs.openjdk.org/browse/JDK-8329823) to jdk22u. With this backport,  We synchronize these features with related JVM flags so that "features" string can reflect actual usable CPU features.

### 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 PASSE


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 b9331cd25ca88b07ce079405f5e3031cf8c13ea6

Changes: https://git.openjdk.org/jdk22u/pull/135/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk22u&pr=135&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/jdk22u/pull/135.diff
  Fetch: git fetch https://git.openjdk.org/jdk22u.git pull/135/head:pull/135

PR: https://git.openjdk.org/jdk22u/pull/135


More information about the jdk-updates-dev mailing list