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

Gui Cao gcao at openjdk.org
Wed Apr 10 07:34:18 UTC 2024


Hi, The same issue also exists in the  jdk21u-dev. I would like to backport [8329823](https://bugs.openjdk.org/browse/JDK-8329823) to jdk21u-dev. 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)

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)

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)

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

PR: https://git.openjdk.org/jdk21u-dev/pull/480


More information about the jdk-updates-dev mailing list