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

CPUInfo: Use enums to represent CPU features

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 17
    • hotspot

    Description

      Replace strings with enums to represent CPU features in sun.hotspot.cpuinfo.CPUInfo.

      public static List<String> getFeatures()
      public static boolean hasFeature(String feature)

      It enables static and dynamic checks to ensure that JVM and tests agree on CPU features.

      test//hotspot/jtreg/compiler/intrinsics/bmi/TestBlsiL.java: if (!CPUInfo.hasFeature("bmi1")) {
      test//hotspot/jtreg/compiler/intrinsics/bmi/TestBzhiI2L.java: if (!CPUInfo.hasFeature("bmi2")) {
      test//hotspot/jtreg/compiler/intrinsics/bmi/TestLzcntI.java: if (!CPUInfo.hasFeature("lzcnt")) {
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vlivanov Vladimir Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: