RFR: 8291550: RISC-V: jdk uses misaligned memory access when AvoidUnalignedAccess enabled [v12]

Vladimir Kempik vkempik at openjdk.org
Thu May 11 15:00:55 UTC 2023


> 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 three additional commits since the last revision:

 - fix register name in branch
 - Redo string_equals patch
 - Revert "Add strig_equals patch to prevent misaligned access there"
   
   This reverts commit 0335cd56b9ad101355b1b477938cbd741b964066.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13645/files
  - new: https://git.openjdk.org/jdk/pull/13645/files/0c5ab1c6..626aed9d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13645&range=11
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13645&range=10-11

  Stats: 46 lines in 1 file changed: 34 ins; 0 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/13645.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13645/head:pull/13645

PR: https://git.openjdk.org/jdk/pull/13645


More information about the hotspot-dev mailing list