[15] RFR (M): 8238681: Make -XX:UseSSE flag x86-specific
David Holmes
david.holmes at oracle.com
Tue Feb 11 12:39:22 UTC 2020
On 11/02/2020 10:36 pm, Vladimir Ivanov wrote:
>
>>>> open/test > vi
>>>> ./hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
>>>>
>>>>
>>>> it has
>>>>
>>>> @requires vm.cpu.features ~= ".*aes.*"
>>>>
>>>> rather than a text for x86/x64. Is that a more specific runtime test
>>>> for x86 capabilities?
>>>
>>> AES intrinsics are available on other platforms as well (e.g.,
>>> AARCH64 and SPARC have them) and CPU features are named uniformly [1]
>>> [2]. So, I don't see an immediate problem to fix here.
>>
>> But the test uses the UseSSE flag so that would mean it is limited to
>> execution on x86 only - even if other platforms have AES. ??
>
> The test has dynamic checks in platform-specific test cases:
>
> 107 private void testUseAESUseSSE2() throws Throwable {
> 108 if (Platform.isX86() || Platform.isX64()) {
>
>
> 165 private void testUseAESUseVIS2() throws Throwable {
> 166 if (Platform.isSparc()) {
Ah! Thanks :)
David
> Best regards,
> Vladimir Ivanov
>
> [1]
> http://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
>
>
>>> But while looking at the test, I noted that verification I added in
>>> vm_version_x86.cpp requires some additional handling in CPUInfo [3]
>>> to ignore trailing dot. So, here's updated webrev:
>>>
>>> http://cr.openjdk.java.net/~vlivanov/8238681/webrev.01/
>>>
>>> Best regards,
>>> Vladimir Ivanov
>>>
>>> [1]
>>> http://hg.openjdk.java.net/jdk/jdk/file/8e6fa89397ca/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp#l285
>>>
>>>
>>> [2]
>>> http://hg.openjdk.java.net/jdk/jdk/file/8e6fa89397ca/src/hotspot/cpu/sparc/vm_version_sparc.cpp#l233
>>>
>>>
>>> [3]
>>> http://hg.openjdk.java.net/jdk/jdk/file/8e6fa89397ca/test/lib/sun/hotspot/cpuinfo/CPUInfo.java
>>>
>>>
>>>>
>>>> Thanks,
>>>> David
>>>>
>>>> On 11/02/2020 3:08 pm, David Holmes wrote:
>>>>> Hi Vladimir,
>>>>>
>>>>> On 11/02/2020 12:19 am, Vladimir Ivanov wrote:
>>>>>> http://cr.openjdk.java.net/~vlivanov/8238681/webrev.00/
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8238681
>>>>>>
>>>>>> Turn UseSSE into x86-specific flag since it doesn't have any
>>>>>> meaning on non-x86 platforms.
>>>>>
>>>>> That part seems okay.
>>>>>
>>>>>> As a cleanup, I made all the code which assumes UseSSE<2 x86-32
>>>>>> specific. (x86-64 ABI requires SSE2.)
>>>>>
>>>>> This made things more obscure for me so I'll leave it to compiler
>>>>> folk to validate.
>>>>>
>>>>>> Also, as a precaution, I made UseSSE obsolete on non-x86 platforms.
>>>>>
>>>>> I took the liberty of filing a very short CSR request for this and
>>>>> added myself as Reviewer. Please change it to "Finalized" and await
>>>>> approval before pushing.
>>>>>
>>>>> Thanks,
>>>>> David
>>>>>
>>>>>> Testing: hs-precheckin-comp, tier1-5, linux x86-32 fastdebug build.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Best regards,
>>>>>> Vladimir Ivanov
More information about the hotspot-dev
mailing list