RFR: 8291550: RISC-V: jdk uses misaligned memory access when AvoidUnalignedAccess enabled [v8]
Feilong Jiang
fjiang at openjdk.org
Fri May 5 11:37:27 UTC 2023
On Fri, 5 May 2023 08:31:23 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:
>> Please review this attempt to remove misaligned loads and stores in risc-v specific part of jdk.
>>
>> The patch has two main parts:
>> - opcodes loads/stores is now using put_native_uX/get_native_uX
>> - some code in template interp got changed to prevent misaligned loads
>>
>> perf stat numbers for trp_lam ( misaligned loads) and trp_sam ( misaligned stores) before the patch:
>>
>> 169598 trp_lam
>> 13562 trp_sam
>>
>>
>> after the patch both numbers are zeroes.
>> I can see template interpreter to be ~40 % faster on hifive unmatched ( 1 repetition of renaissance philosophers in -Xint mode), and the same performance ( before and after the patch) on thead rvb-ice ( which supports misaligned stores/loads in hw)
>>
>> tier testing on hw is in progress
>
> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>
> rename helper function, add assertion
If I remember correctly, there are some misaligned access at string intrinsics. Here are the related PRs at riscv-collab:
- https://github.com/riscv-collab/riscv-openjdk/pull/19
- https://github.com/riscv-collab/riscv-openjdk/pull/17
- https://github.com/riscv-collab/riscv-openjdk/pull/14
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13645#issuecomment-1536128363
More information about the hotspot-dev
mailing list