[jdk17u-dev] Integrated: 8309502: RISC-V: String.indexOf intrinsic may produce misaligned memory loads

Olga Mikhaltsova omikhaltcova at openjdk.org
Tue Oct 10 20:22:45 UTC 2023


On Sun, 8 Oct 2023 15:36:53 GMT, Olga Mikhaltsova <omikhaltcova at openjdk.org> wrote:

> I'd like to backport JDK-8309502 to jdk17u. This fix is related only to RISC-V.
> 
> The patch applies almost cleanly except `src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp` because of deletion an empty line at the end in the original patch.
> 
> Testing: tier1 tests successfully passed on a RISC-V HiFive board with Linux.
> 
> As it's described in the original fix, this performance improvement can be observed by running the StringIndexOf.advancedWithMediumSub benchmark. The results for jdk17u are as follow:
> Before
> 
> Benchmark                            Mode  Cnt       Score      Error  Units
> StringIndexOf.advancedWithMediumSub  avgt   25  618932.002 ± 7990.408  ns/op
> 
> After
> 
> Benchmark                            Mode  Cnt      Score     Error  Units
> StringIndexOf.advancedWithMediumSub  avgt   25  36884.314 ± 196.536  ns/op

This pull request has now been integrated.

Changeset: 8e4f66a6
Author:    Olga Mikhaltsova <omikhaltcova at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/8e4f66a6187bca6812e6505b0704a5dcf6a5feeb
Stats:     83 lines in 3 files changed: 67 ins; 5 del; 11 mod

8309502: RISC-V: String.indexOf intrinsic may produce misaligned memory loads

Reviewed-by: vkempik
Backport-of: 6b942893868fa1a64977288bdbdb1bbff8bd9d9c

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

PR: https://git.openjdk.org/jdk17u-dev/pull/1857


More information about the jdk-updates-dev mailing list