Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8329823

RISC-V: Need to sync CPU features with related JVM flags

    XMLWordPrintable

Details

    • b18
    • riscv
    • linux

    Backports

      Description

        Currently, "features" string is not accurate in that the RISC-V CPU features/extensions which are disabled by user on the command are still added. We need to synchronize these features with related JVM flags so that "features" string can reflect actual usable CPU features.

        1. "features" string without specifying any jvm flags

        ```
        $ /home/zifeihan/jtreg/bin/jtreg -jdk:/home/zifeihan/jre/jdk /home/zifeihan/jdk/test/lib-test/jdk/test/whitebox/CPUInfoTest.java

        ----------System.out:(4/167)----------
        WB.getCPUFeatures(): "rv64 i m a f d c v zba zbb zbs"
        CPUInfo.getAdditionalCPUInfo(): ""
        CPUInfo.getFeatures(): [rv64, i, m, a, f, d, c, v, zba, zbb, zbs]
        TEST PASSED
        ```

        2. "features" string with specifying `-XX:-UseZba`

        ```
        $ /home/zifeihan/jtreg/bin/jtreg -javaoption:-XX:-UseZba -jdk:/home/zifeihan/jre/jdk /home/zifeihan/jdk/test/lib-test/jdk/test/whitebox/CPUInfoTest.java

        ----------System.out:(4/167)----------
        WB.getCPUFeatures(): "rv64 i m a f d c v zba zbb zbs"
        CPUInfo.getAdditionalCPUInfo(): ""
        CPUInfo.getFeatures(): [rv64, i, m, a, f, d, c, v, zba, zbb, zbs]
        TEST PASSED
        ```

        Attachments

          Issue Links

            Activity

              People

                gcao Gui Cao
                gcao Gui Cao
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: