[10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann-2
Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8194494
http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/

The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
supports_avx2() && supports_bmi2() on x86.

I had no suitable machine available for testing but I was able to trigger the problem by enforcing
UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).

This problem was reported by Csaba Mate [1].

Thanks,
Tobias

[1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

matecs
hi,
i've built a jre for myself on a debian sid.
after severe segfaults in gcc7.2 (i also got a lot of deprecation,
various null related, and soe other kind of warnings, you really
should check the compilation on fresh sid...:),
finally it seems that i have a working self built jre...:)
i can confirm that your patch works, the discussed trigger code
runs without any issue. then i tried my project's (freerouter.nop.hu)
crypto tests to see the performance and it seems to me that
this jvm only uses aes intrinsics, but none of the sha ones,
however the cpu reports itself as it can do sha...
regards,
csaba mate


mc36@player:~/jre/bin$ ./java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-adhoc.mc36.jdk9)
OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.mc36.jdk9, mixed mode)
mc36@player:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
aes: 618131 rnd, 632966144 bytes, 3 sec, 205975 pps, 1687mbps
blowfish: 76307 rnd, 78138368 bytes, 3 sec, 25427 pps, 208mbps
3des: 13551 rnd, 13876224 bytes, 3 sec, 4515 pps, 36mbps
des: 32947 rnd, 33737728 bytes, 3 sec, 10978 pps, 89mbps
rc2: 43106 rnd, 44140544 bytes, 3 sec, 14363 pps, 117mbps
md2: 12870 rnd, 13178880 bytes, 3 sec, 4288 pps, 35mbps
md5: 49721 rnd, 50914304 bytes, 3 sec, 16568 pps, 135mbps
sha1: 49745 rnd, 50938880 bytes, 3 sec, 16576 pps, 135mbps
sha256: 50830 rnd, 52049920 bytes, 3 sec, 16937 pps, 138mbps
sha384: 42972 rnd, 44003328 bytes, 3 sec, 14319 pps, 117mbps
sha512: 42997 rnd, 44028928 bytes, 3 sec, 14327 pps, 117mbps
hmac-md2: 10985 rnd, 11248640 bytes, 3 sec, 3660 pps, 29mbps
hmac-md5: 41570 rnd, 42567680 bytes, 3 sec, 13852 pps, 113mbps
hmac-sha1: 42608 rnd, 43630592 bytes, 3 sec, 14197 pps, 116mbps
hmac-sha256: 40003 rnd, 40963072 bytes, 3 sec, 13329 pps, 109mbps
hmac-sha384: 30728 rnd, 31465472 bytes, 3 sec, 10239 pps, 83mbps
hmac-sha512: 30505 rnd, 31237120 bytes, 3 sec, 10164 pps, 83mbps
error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1
reason=finished
mc36@player:~/jre/bin$


mc36@mediapc:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
aes: 340851 rnd, 349031424 bytes, 3 sec, 113579 pps, 930mbps
blowfish: 47741 rnd, 48886784 bytes, 3 sec, 15908 pps, 130mbps
3des: 8761 rnd, 8971264 bytes, 3 sec, 2919 pps, 23mbps
des: 24891 rnd, 25488384 bytes, 3 sec, 8294 pps, 67mbps
rc2: 33098 rnd, 33892352 bytes, 3 sec, 11028 pps, 90mbps
md2: 8770 rnd, 8980480 bytes, 3 sec, 2922 pps, 23mbps
md5: 34564 rnd, 35393536 bytes, 3 sec, 11517 pps, 94mbps
sha1: 36215 rnd, 37084160 bytes, 3 sec, 12067 pps, 98mbps
sha256: 34091 rnd, 34909184 bytes, 3 sec, 11359 pps, 93mbps
sha384: 31332 rnd, 32083968 bytes, 3 sec, 10440 pps, 85mbps
sha512: 30960 rnd, 31703040 bytes, 3 sec, 10316 pps, 84mbps
hmac-md2: 7952 rnd, 8142848 bytes, 3 sec, 2649 pps, 21mbps
hmac-md5: 29842 rnd, 30558208 bytes, 3 sec, 9944 pps, 81mbps
hmac-sha1: 30471 rnd, 31202304 bytes, 3 sec, 10153 pps, 83mbps
hmac-sha256: 28544 rnd, 29229056 bytes, 3 sec, 9511 pps, 77mbps
hmac-sha384: 22197 rnd, 22729728 bytes, 3 sec, 7396 pps, 60mbps
hmac-sha512: 21893 rnd, 22418432 bytes, 3 sec, 7295 pps, 59mbps
error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1
reason=finished
mc36@mediapc:~/jre/bin$






On 01/03/2018 05:49 PM, Tobias Hartmann wrote:

> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8194494
> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>
> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
> supports_avx2() && supports_bmi2() on x86.
>
> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>
> This problem was reported by Csaba Mate [1].
>
> Thanks,
> Tobias
>
> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Vladimir Kozlov
In reply to this post by Tobias Hartmann-2
Hi Tobias,

Even so sha512 is only implemented for 64-bit I think you should not restrict check with LP64_ONLY(). The only
implementation uses avx2.

Thanks,
Vladimir

On 1/3/18 8:49 AM, Tobias Hartmann wrote:

> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8194494
> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>
> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
> supports_avx2() && supports_bmi2() on x86.
>
> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>
> This problem was reported by Csaba Mate [1].
>
> Thanks,
> Tobias
>
> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann-2
Hi Vladimir,

On 03.01.2018 20:44, Vladimir Kozlov wrote:
> Even so sha512 is only implemented for 64-bit I think you should not restrict check with LP64_ONLY(). The only
> implementation uses avx2.

Okay, that makes sense. Here's the new webrev:
http://cr.openjdk.java.net/~thartmann/8194494/webrev.01/

Thanks,
Tobias


> On 1/3/18 8:49 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8194494
>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>>
>> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
>> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
>> supports_avx2() && supports_bmi2() on x86.
>>
>> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
>> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>>
>> This problem was reported by Csaba Mate [1].
>>
>> Thanks,
>> Tobias
>>
>> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann-2
In reply to this post by matecs
Hi Csaba,

On 03.01.2018 20:13, matecs wrote:
> after severe segfaults in gcc7.2 (i also got a lot of deprecation,
> various null related, and soe other kind of warnings, you really
> should check the compilation on fresh sid...:),

I think that's because gcc 7.2 is currently not supported. See:
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms

We are building with gcc 4.9.2 on Linux.

> finally it seems that i have a working self built jre...:)
> i can confirm that your patch works, the discussed trigger code
> runs without any issue.

Perfect, thanks a lot for verifying the patch!

> then i tried my project's (freerouter.nop.hu)
> crypto tests to see the performance and it seems to me that
> this jvm only uses aes intrinsics, but none of the sha ones,
> however the cpu reports itself as it can do sha...

The SHA-512 stub is currently only implemented with AVX but SHA-256 and SHA-1 should use SHA instructions if available.

How did you check that no SHA instructions are used?

Best regards,
Tobias

> mc36@player:~/jre/bin$ ./java -version
> openjdk version "9-internal"
> OpenJDK Runtime Environment (build 9-internal+0-adhoc.mc36.jdk9)
> OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.mc36.jdk9, mixed mode)
> mc36@player:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
> aes: 618131 rnd, 632966144 bytes, 3 sec, 205975 pps, 1687mbps
> blowfish: 76307 rnd, 78138368 bytes, 3 sec, 25427 pps, 208mbps
> 3des: 13551 rnd, 13876224 bytes, 3 sec, 4515 pps, 36mbps
> des: 32947 rnd, 33737728 bytes, 3 sec, 10978 pps, 89mbps
> rc2: 43106 rnd, 44140544 bytes, 3 sec, 14363 pps, 117mbps
> md2: 12870 rnd, 13178880 bytes, 3 sec, 4288 pps, 35mbps
> md5: 49721 rnd, 50914304 bytes, 3 sec, 16568 pps, 135mbps
> sha1: 49745 rnd, 50938880 bytes, 3 sec, 16576 pps, 135mbps
> sha256: 50830 rnd, 52049920 bytes, 3 sec, 16937 pps, 138mbps
> sha384: 42972 rnd, 44003328 bytes, 3 sec, 14319 pps, 117mbps
> sha512: 42997 rnd, 44028928 bytes, 3 sec, 14327 pps, 117mbps
> hmac-md2: 10985 rnd, 11248640 bytes, 3 sec, 3660 pps, 29mbps
> hmac-md5: 41570 rnd, 42567680 bytes, 3 sec, 13852 pps, 113mbps
> hmac-sha1: 42608 rnd, 43630592 bytes, 3 sec, 14197 pps, 116mbps
> hmac-sha256: 40003 rnd, 40963072 bytes, 3 sec, 13329 pps, 109mbps
> hmac-sha384: 30728 rnd, 31465472 bytes, 3 sec, 10239 pps, 83mbps
> hmac-sha512: 30505 rnd, 31237120 bytes, 3 sec, 10164 pps, 83mbps
> error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1 reason=finished
> mc36@player:~/jre/bin$
>
>
> mc36@mediapc:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
> aes: 340851 rnd, 349031424 bytes, 3 sec, 113579 pps, 930mbps
> blowfish: 47741 rnd, 48886784 bytes, 3 sec, 15908 pps, 130mbps
> 3des: 8761 rnd, 8971264 bytes, 3 sec, 2919 pps, 23mbps
> des: 24891 rnd, 25488384 bytes, 3 sec, 8294 pps, 67mbps
> rc2: 33098 rnd, 33892352 bytes, 3 sec, 11028 pps, 90mbps
> md2: 8770 rnd, 8980480 bytes, 3 sec, 2922 pps, 23mbps
> md5: 34564 rnd, 35393536 bytes, 3 sec, 11517 pps, 94mbps
> sha1: 36215 rnd, 37084160 bytes, 3 sec, 12067 pps, 98mbps
> sha256: 34091 rnd, 34909184 bytes, 3 sec, 11359 pps, 93mbps
> sha384: 31332 rnd, 32083968 bytes, 3 sec, 10440 pps, 85mbps
> sha512: 30960 rnd, 31703040 bytes, 3 sec, 10316 pps, 84mbps
> hmac-md2: 7952 rnd, 8142848 bytes, 3 sec, 2649 pps, 21mbps
> hmac-md5: 29842 rnd, 30558208 bytes, 3 sec, 9944 pps, 81mbps
> hmac-sha1: 30471 rnd, 31202304 bytes, 3 sec, 10153 pps, 83mbps
> hmac-sha256: 28544 rnd, 29229056 bytes, 3 sec, 9511 pps, 77mbps
> hmac-sha384: 22197 rnd, 22729728 bytes, 3 sec, 7396 pps, 60mbps
> hmac-sha512: 21893 rnd, 22418432 bytes, 3 sec, 7295 pps, 59mbps
> error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1 reason=finished
> mc36@mediapc:~/jre/bin$
>
>
>
>
>
>
> On 01/03/2018 05:49 PM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8194494
>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>>
>> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
>> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
>> supports_avx2() && supports_bmi2() on x86.
>>
>> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
>> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>>
>> This problem was reported by Csaba Mate [1].
>>
>> Thanks,
>> Tobias
>>
>> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Vladimir Kozlov
In reply to this post by Tobias Hartmann-2
Good.

Thanks,
Vladimir

On 1/3/18 11:35 PM, Tobias Hartmann wrote:

> Hi Vladimir,
>
> On 03.01.2018 20:44, Vladimir Kozlov wrote:
>> Even so sha512 is only implemented for 64-bit I think you should not restrict check with LP64_ONLY(). The only
>> implementation uses avx2.
>
> Okay, that makes sense. Here's the new webrev:
> http://cr.openjdk.java.net/~thartmann/8194494/webrev.01/
>
> Thanks,
> Tobias
>
>
>> On 1/3/18 8:49 AM, Tobias Hartmann wrote:
>>> Hi,
>>>
>>> please review the following patch:
>>> https://bugs.openjdk.java.net/browse/JDK-8194494
>>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>>>
>>> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
>>> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
>>> supports_avx2() && supports_bmi2() on x86.
>>>
>>> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
>>> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>>>
>>> This problem was reported by Csaba Mate [1].
>>>
>>> Thanks,
>>> Tobias
>>>
>>> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann-2
Thanks Vladimir!

Best regards,
Tobias

On 04.01.2018 18:11, Vladimir Kozlov wrote:

> Good.
>
> Thanks,
> Vladimir
>
> On 1/3/18 11:35 PM, Tobias Hartmann wrote:
>> Hi Vladimir,
>>
>> On 03.01.2018 20:44, Vladimir Kozlov wrote:
>>> Even so sha512 is only implemented for 64-bit I think you should not restrict check with LP64_ONLY(). The only
>>> implementation uses avx2.
>>
>> Okay, that makes sense. Here's the new webrev:
>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.01/
>>
>> Thanks,
>> Tobias
>>
>>
>>> On 1/3/18 8:49 AM, Tobias Hartmann wrote:
>>>> Hi,
>>>>
>>>> please review the following patch:
>>>> https://bugs.openjdk.java.net/browse/JDK-8194494
>>>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>>>>
>>>> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
>>>> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
>>>> supports_avx2() && supports_bmi2() on x86.
>>>>
>>>> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
>>>> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>>>>
>>>> This problem was reported by Csaba Mate [1].
>>>>
>>>> Thanks,
>>>> Tobias
>>>>
>>>> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>>>>
Reply | Threaded
Open this post in threaded view
|

Re: [10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Tobias Hartmann-2
In reply to this post by Tobias Hartmann-2

On 04.01.2018 19:06, matecs wrote:

>> How did you check that no SHA instructions are used?
> you're right, i just run a quick test on 2 boxes with the newly compiled jre,
> and my interpretation is completely based on guess: i'm used to see
> bigger numbers...:)
> now i've done a more extensive test, i involved more kind of cpus (*),
> some without avx, some with sha+avx, some without avs+sha, and i can
> confirm that when avx+sha both found in cpuid, then i can measure
> about two times more sha2 throughput without the -XX:-UseSHA option
> than with the default -XX:+UseSHA, so again, sha2 intrinsic works
> with the patch as expected...

Okay, thanks a lot for verifying!

Best regards,
Tobias

> *: these cpus were involved:
>
> Intel(R) Xeon(R) CPU E5-2640 v3
> Intel(R) Xeon(R) CPU E5-2650 v2
> Intel(R) Xeon(R) CPU E5620
> Intel(R) Xeon(R) CPU L5640
> Intel(R) Xeon(R) CPU E5606
> Intel(R) Xeon(R) CPU E5-2650L v4
> Intel(R) Core(TM) i5-4200M
> Intel(R) Core(TM)2 Duo CPU     E6400
> Intel(R) Celeron(R) 2955U
> Dual-Core AMD Opteron(tm) Processor 2216
> Intel(R) Celeron(R) CPU J3455
> Intel(R) Celeron(R) CPU N3350
>
> freerouter runs on these, and the autoupgrade uses both sha512
> and sha256 during it's operation, this is how i noticed the issue
> on celerons, the others works without the patch too.
>
> regards,
>
> csaba mate
>
>
>>
>> Best regards,
>> Tobias
>>> mc36@player:~/jre/bin$ ./java -version
>>> openjdk version "9-internal"
>>> OpenJDK Runtime Environment (build 9-internal+0-adhoc.mc36.jdk9)
>>> OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.mc36.jdk9, mixed mode)
>>> mc36@player:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
>>> aes: 618131 rnd, 632966144 bytes, 3 sec, 205975 pps, 1687mbps
>>> blowfish: 76307 rnd, 78138368 bytes, 3 sec, 25427 pps, 208mbps
>>> 3des: 13551 rnd, 13876224 bytes, 3 sec, 4515 pps, 36mbps
>>> des: 32947 rnd, 33737728 bytes, 3 sec, 10978 pps, 89mbps
>>> rc2: 43106 rnd, 44140544 bytes, 3 sec, 14363 pps, 117mbps
>>> md2: 12870 rnd, 13178880 bytes, 3 sec, 4288 pps, 35mbps
>>> md5: 49721 rnd, 50914304 bytes, 3 sec, 16568 pps, 135mbps
>>> sha1: 49745 rnd, 50938880 bytes, 3 sec, 16576 pps, 135mbps
>>> sha256: 50830 rnd, 52049920 bytes, 3 sec, 16937 pps, 138mbps
>>> sha384: 42972 rnd, 44003328 bytes, 3 sec, 14319 pps, 117mbps
>>> sha512: 42997 rnd, 44028928 bytes, 3 sec, 14327 pps, 117mbps
>>> hmac-md2: 10985 rnd, 11248640 bytes, 3 sec, 3660 pps, 29mbps
>>> hmac-md5: 41570 rnd, 42567680 bytes, 3 sec, 13852 pps, 113mbps
>>> hmac-sha1: 42608 rnd, 43630592 bytes, 3 sec, 14197 pps, 116mbps
>>> hmac-sha256: 40003 rnd, 40963072 bytes, 3 sec, 13329 pps, 109mbps
>>> hmac-sha384: 30728 rnd, 31465472 bytes, 3 sec, 10239 pps, 83mbps
>>> hmac-sha512: 30505 rnd, 31237120 bytes, 3 sec, 10164 pps, 83mbps
>>> error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1 reason=finished
>>> mc36@player:~/jre/bin$
>>>
>>>
>>> mc36@mediapc:~/jre/bin$ ./java -jar /safe/src/src/rtr.jar test crypto
>>> aes: 340851 rnd, 349031424 bytes, 3 sec, 113579 pps, 930mbps
>>> blowfish: 47741 rnd, 48886784 bytes, 3 sec, 15908 pps, 130mbps
>>> 3des: 8761 rnd, 8971264 bytes, 3 sec, 2919 pps, 23mbps
>>> des: 24891 rnd, 25488384 bytes, 3 sec, 8294 pps, 67mbps
>>> rc2: 33098 rnd, 33892352 bytes, 3 sec, 11028 pps, 90mbps
>>> md2: 8770 rnd, 8980480 bytes, 3 sec, 2922 pps, 23mbps
>>> md5: 34564 rnd, 35393536 bytes, 3 sec, 11517 pps, 94mbps
>>> sha1: 36215 rnd, 37084160 bytes, 3 sec, 12067 pps, 98mbps
>>> sha256: 34091 rnd, 34909184 bytes, 3 sec, 11359 pps, 93mbps
>>> sha384: 31332 rnd, 32083968 bytes, 3 sec, 10440 pps, 85mbps
>>> sha512: 30960 rnd, 31703040 bytes, 3 sec, 10316 pps, 84mbps
>>> hmac-md2: 7952 rnd, 8142848 bytes, 3 sec, 2649 pps, 21mbps
>>> hmac-md5: 29842 rnd, 30558208 bytes, 3 sec, 9944 pps, 81mbps
>>> hmac-sha1: 30471 rnd, 31202304 bytes, 3 sec, 10153 pps, 83mbps
>>> hmac-sha256: 28544 rnd, 29229056 bytes, 3 sec, 9511 pps, 77mbps
>>> hmac-sha384: 22197 rnd, 22729728 bytes, 3 sec, 7396 pps, 60mbps
>>> hmac-sha512: 21893 rnd, 22418432 bytes, 3 sec, 7295 pps, 59mbps
>>> error cfg.cfgInit.stopRouter:cfgInit.java:745 shutdown code=1 reason=finished
>>> mc36@mediapc:~/jre/bin$
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 01/03/2018 05:49 PM, Tobias Hartmann wrote:
>>>> Hi,
>>>>
>>>> please review the following patch:
>>>> https://bugs.openjdk.java.net/browse/JDK-8194494
>>>> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
>>>>
>>>> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
>>>> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
>>>> supports_avx2() && supports_bmi2() on x86.
>>>>
>>>> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
>>>> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
>>>>
>>>> This problem was reported by Csaba Mate [1].
>>>>
>>>> Thanks,
>>>> Tobias
>>>>
>>>> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html
>>>>