< prev index next >

test/lib-test/jdk/test/whitebox/CPUInfoTest.java

Print this page

45 
46     private static final Set<String> wellKnownCPUFeatures;
47 
48     static {
49         if (Platform.isX86() || Platform.isX64()) {
50             // @formatter:off
51             // Checkstyle: stop
52             // See hotspot/cpu/x86/vm_version_x86.hpp for the list of supported features.
53             wellKnownCPUFeatures = Set.of(
54                     "cx8",          "cmov",             "fxsr",              "ht",
55                     "mmx",          "3dnowpref",        "sse",               "sse2",
56                     "sse3",         "ssse3",            "sse4a",             "sse4.1",
57                     "sse4.2",       "popcnt",           "lzcnt",             "tsc",
58                     "tscinvbit",    "tscinv",           "avx",               "avx2",
59                     "aes",          "erms",             "clmul",             "bmi1",
60                     "bmi2",         "rtm",              "adx",               "avx512f",
61                     "avx512dq",     "avx512pf",         "avx512er",          "avx512cd",
62                     "avx512bw",     "avx512vl",         "sha",               "fma",
63                     "vzeroupper",   "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vaes",
64                     "avx512_vnni",  "clflush",          "clflushopt",        "clwb",
65                     "avx512_vbmi2", "avx512_vbmi",      "hv"

66                     );
67             // @formatter:on
68             // Checkstyle: resume
69         } else {
70             wellKnownCPUFeatures = null;
71         }
72     }
73 
74     public static void main(String args[]) throws Throwable {
75         System.out.println("WB.getCPUFeatures(): \"" + WB.getCPUFeatures() + "\"");
76 
77         String additionalCpuInfo = CPUInfo.getAdditionalCPUInfo();
78         assertTrue(additionalCpuInfo != null);
79         System.out.println("CPUInfo.getAdditionalCPUInfo(): \"" + additionalCpuInfo + "\"");
80 
81         List<String> features = CPUInfo.getFeatures();
82         assertTrue(features != null);
83         System.out.println("CPUInfo.getFeatures(): " + features);
84 
85         for (String feature : features) {

45 
46     private static final Set<String> wellKnownCPUFeatures;
47 
48     static {
49         if (Platform.isX86() || Platform.isX64()) {
50             // @formatter:off
51             // Checkstyle: stop
52             // See hotspot/cpu/x86/vm_version_x86.hpp for the list of supported features.
53             wellKnownCPUFeatures = Set.of(
54                     "cx8",          "cmov",             "fxsr",              "ht",
55                     "mmx",          "3dnowpref",        "sse",               "sse2",
56                     "sse3",         "ssse3",            "sse4a",             "sse4.1",
57                     "sse4.2",       "popcnt",           "lzcnt",             "tsc",
58                     "tscinvbit",    "tscinv",           "avx",               "avx2",
59                     "aes",          "erms",             "clmul",             "bmi1",
60                     "bmi2",         "rtm",              "adx",               "avx512f",
61                     "avx512dq",     "avx512pf",         "avx512er",          "avx512cd",
62                     "avx512bw",     "avx512vl",         "sha",               "fma",
63                     "vzeroupper",   "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vaes",
64                     "avx512_vnni",  "clflush",          "clflushopt",        "clwb",
65                     "avx512_vbmi2", "avx512_vbmi",      "rdtscp",            "rdpid",
66                     "fsrm",         "hv"
67                     );
68             // @formatter:on
69             // Checkstyle: resume
70         } else {
71             wellKnownCPUFeatures = null;
72         }
73     }
74 
75     public static void main(String args[]) throws Throwable {
76         System.out.println("WB.getCPUFeatures(): \"" + WB.getCPUFeatures() + "\"");
77 
78         String additionalCpuInfo = CPUInfo.getAdditionalCPUInfo();
79         assertTrue(additionalCpuInfo != null);
80         System.out.println("CPUInfo.getAdditionalCPUInfo(): \"" + additionalCpuInfo + "\"");
81 
82         List<String> features = CPUInfo.getFeatures();
83         assertTrue(features != null);
84         System.out.println("CPUInfo.getFeatures(): " + features);
85 
86         for (String feature : features) {
< prev index next >