RFR: 8339063: [aarch64] Skip verify_sve_vector_length after native calls if SVE supports 128 bits VL only [v2]
Joshua Zhu
jzhu at openjdk.org
Wed Aug 28 14:17:19 UTC 2024
On Wed, 28 Aug 2024 09:21:00 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
> The code changes look ok. What have you done to test it?
@adinn Thanks for your review!
> The maximum SVE vector length "VLmax" is determined by the hardware: 16 <= VLmax <= 256. The value of VL can be configured at runtime: 16 <= VL <= VLmax, where VL must be a multiple of 16.
>
> Once we find cpu's VLMax is 16 bytes only, the verification "verify_sve_vector_length()" after native calls is not required - in other words, VL cannot be configured to a value other than 16.
I checked the behavior of prctl(PR_SVE_SET_VL, value) by a separated C case.
https://github.com/JoshuaZhuwj/openjdk_cases/blob/master/8339063/setSVEVL.c
The output is aligned with the above expectation.
https://github.com/JoshuaZhuwj/openjdk_cases/blob/master/8339063/output
I have an aarch64 hardware at hand with only 128-bit SVE vector length.
With this change applied, the generated native wrapper and native entry no longer check SVE VL change after native calls in the machine.
I also ensure no regression failures by jtreg case:
test/hotspot/jtreg/compiler/c2/aarch64/TestSVEWithJNI.java
Also no regression failures when JVM starts up by specifying different MaxVectorSize.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20724#issuecomment-2315459504
More information about the hotspot-compiler-dev
mailing list