RFR: 8292713: Unsafe.allocateInstance should be intrinsified without UseUnalignedAccesses

Aleksey Shipilev shade at openjdk.org
Mon Aug 22 21:15:59 UTC 2022


On Mon, 22 Aug 2022 21:04:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the rationale and references in the bug. This PR improves the selected tests very considerably, and I think it actually fixes the real performance bug in `java.lang.invoke`-rich code paths.
> 
> Raspberry Pi 4, ARM32 fastdebug build:
> 
> 
> $ time make test TEST=java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java
> 
> # Baseline
> 
> real	4m37.970s
> user	6m5.490s
> sys	0m21.731s
> 
> real	4m52.363s
> user	6m24.100s
> sys	0m21.363s
> 
> # Patched
> 
> real	2m32.678s ; <--- 1.8x faster
> user	4m33.749s
> sys	0m22.127s
> 
> real	2m38.451s ; <--- 1.8x faster, reproducible
> user	4m44.788s
> sys	0m22.160s
> 
> 
> HiFive Unmatched, RISC-V fastdebug build:
> 
> 
> $ time make test TEST=java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java
> 
> # Baseline
> 
> real	19m3.479s
> user	27m2.932s
> sys	0m27.766s
> 
> real	18m52.351s
> user	27m23.917s
> sys	0m27.682s
> 
> # Patched
> 
> real	10m5.971s  ; <--- 1.9x faster
> user	18m11.538s
> sys	0m28.204s
> 
> real	10m18.973s ; <--- 1.9x faster, reproducible
> user	18m31.067s
> sys	0m28.053s
> 
> 
> Additional testing:
>  - [x] Linux RISC-V build, timing tests
>  - [x] Linux ARM32 build, timing tests
>  - [x] Linux ARM32 fastdebug `tier1`

@RealFYang, you might want to give it a spin on your RISC-V machines ;)

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

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


More information about the hotspot-compiler-dev mailing list