RFR: 8322583: RISC-V: Enable fast class initialization checks
Fei Yang
fyang at openjdk.org
Tue Jan 2 02:00:48 UTC 2024
On Tue, 26 Dec 2023 07:14:22 GMT, Gui Cao <gcao at openjdk.org> wrote:
> Hi, Please review this small change enabling fast class initialization checks on linux-riscv. As discussed on [1], we noticed that VM_Version::supports_fast_class_init_checks is false on linux-riscv64 platform. But the needed code of this optimization on this platform is there which is supposed to solve a performance issue https://bugs.openjdk.org/browse/JDK-8219233 at that time. I found that this performance issue is still reproduciable on linux-riscv64. And the original performance issue reported by JDK-8219233 is resolved when this optimization is enabled (x2.5 improvement for reported case on linux-riscv64).
>
> Once this is in, I'd like to request approval for backporting to JDK 21u and JDK 17u since corresponding fixes for the other ports are already there, unless the community feels otherwise.
>
> [1] https://github.com/openjdk/jdk/pull/17006#issuecomment-1865582796
>
> OpenJDK23 linux-riscv64 when setting VM_Version::supports_fast_class_init_checks returns false(default):
>
>
> $ clojure -A:user
> "Elapsed time: 91597.717028 msecs"
> $ clojure -A:user
> "Elapsed time: 91851.01435 msecs"
> $ clojure -A:user
> "Elapsed time: 92149.106378 msecs"
> $ clojure foo.clj
> "Elapsed time: 35663.36249 msecs"
> $ clojure foo.clj
> "Elapsed time: 35677.387338 msecs"
> $ clojure foo.clj
> "Elapsed time: 35253.330701 msecs"
>
>
> OpenJDK23 linux-riscv64 when setting VM_Version::supports_fast_class_init_checks returns true:
>
>
> $ clojure -A:user
> "Elapsed time: 37425.063258 msecs"
> $ clojure -A:user
> "Elapsed time: 36338.252422 msecs"
> $ clojure -A:user
> "Elapsed time: 37441.73001 msecs"
> $ clojure foo.clj
> "Elapsed time: 36018.857489 msecs"
> $ clojure foo.clj
> "Elapsed time: 34750.533297 msecs"
> $ clojure foo.clj
> "Elapsed time: 35499.890121 msecs"
>
>
> ### Testing:
>
> - [x] Run tier1-3 tests on qemu 8.1.0 with UseRVV (fastdebug)
> - [x] Run tier1-3 tests on qemu 8.1.0 with UseRVV (release)
> - [x] Run tier1-3, hotspot:tier4 tests with SiFive unmatched (release)
Marked as reviewed by fyang (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17192#pullrequestreview-1799903545
More information about the hotspot-dev
mailing list