RFR: 8310949: RISC-V: Initialize UseUnalignedAccesses [v3]

Aleksey Shipilev shade at openjdk.org
Wed Jun 28 08:32:13 UTC 2023


On Tue, 27 Jun 2023 14:00:31 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:

>> 8310949: RISC-V: Initialize UseUnalignedAccesses
>
> Ludovic Henry has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixup! 8310949: RISC-V: Initialize UseUnalignedAccesses

The unaligned accesses paths were originally introduced to support faster word-sized accesses, where possible: https://bugs.openjdk.org/browse/JDK-8026049. So `UseUnalignedAccesses` means "unaligned accesses are supported and faster than groups of byte-sized accesses". If this is not true on some RISC-V implementations, we should not enable `+UseUnalignedAccesses` there, I think.

It would not be unusual to default to `+UseUnalignedAccesses`, and then make a few exceptions for known-slow platforms. Assuming we can sense them, of course. See how x86 code sometimes excepts configurations based on CPU family or microarchitecture.

Edit: I am seeing here https://cr.openjdk.org/~dzhang/TestUseUnalignedAccesses/TestUseUnalignedAccesses_result.txt -- that on Unmatched, we have 30x..40x regression with `+UseUnalignedAccesses`, wow. That looks like a showstopper!

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14676#issuecomment-1610986994


More information about the hotspot-dev mailing list