test/lib-test/jdk/test/whitebox/CPUInfoTest.java fails on Intel Alder/Raptor Lake

Kosta Stojiljkovic kostasto at proton.me
Tue Mar 14 15:59:15 UTC 2023


Dear all,

On a machine with the 13th gen Intel CPU, WhiteBox test in the file CPUInfoTest.java fails.

The test in question checks the features returned from the CPUInfo class against a hardcoded set of well known CPU features inside the test, that looks like this:

wellKnownCPUFeatures = Set.of( "cx8", "cmov", "fxsr", "ht", "mmx", "3dnowpref", "sse", "sse2", "sse3", "ssse3", "sse4a", "sse4.1", "sse4.2", "popcnt", "lzcnt", "tsc", "tscinvbit", "tscinv", "avx", "avx2", "aes", "erms", "clmul", "bmi1", "bmi2", "rtm", "adx", "avx512f", "avx512dq", "avx512pf", "avx512er", "avx512cd", "avx512bw", "avx512vl", "sha", "fma", "vzeroupper", "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vaes", "avx512_vnni", "clflush", "clflushopt", "clwb", "avx512_vbmi2", "avx512_vbmi", "rdtscp", "rdpid", "hv", "fsrm", "avx512_bitalg", "gfni", "f16c", "pku", "ospke", "cet_ibt", "cet_ss", "avx512_ifma");

This set of strings on the other hand does not account for the SERIALIZE instruction, added in the 12th generation of Intel Core processors (codenamed Alder Lake), while the processor inspection implementation in /src/hotspot/cpu/x86/vm_version_x86.cpp picks up the flag for it, thus leading to a discrepancy between the features set in the test and the features string obtained from CPUInfo class, when ran on the 12th gen processors and higher.

The support for this feature seems to have been added to the code base with the following commit: [8284161: Implementation of Virtual Thread](https://github.com/openjdk/jdk/commit/9583e3657e43cc1c6f2101a64534564db2a9bd84), but the authors may have missed adding the "serialize" string to the set of well known CPU features in the CPUInfoTest.java file.

I would like to extend the wellKnownCPUFeatures set with the "serialize" keyword, unless there is a reason that this keyword is missing that I do not see?

If that isn't the case, I would appreciate getting some support with creating an issue in JBS, since I am not an author yet :)

I look forward to your feedback!

Best Regards,
Kosta Stojiljkovic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-compiler-dev/attachments/20230314/880685df/attachment.htm>


More information about the hotspot-compiler-dev mailing list