RFR: 8343415: RISC-V: Increase maximum size of C2EntryBarrierStub by one

Fei Yang fyang at openjdk.org
Fri Nov 1 02:35:02 UTC 2024


Hi, please consider this small change.

There is one jump to continuation (after nmethod entry barriers) in C2EntryBarrierStub [1].
The current max_size setting assumes the distance is within 1MB, which means a simple `jal` instruction [2].
So I just count one for this jump in [JDK-8343121](https://bugs.openjdk.org/browse/JDK-8343121). This doesn't seem to break for various tests. But I don't think there is a good reason for that assumption to stand. Instead, we should remove this constraint assuming a `auipc+jalr` pair for this jump.

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/c2_CodeStubs_riscv.cpp#L66
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L965

Testing on linux-riscv64:
- [x] tier1 (fastdebug build)

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

Commit messages:
 - 8343415: RISC-V: Increased maximum size of C2EntryBarrierStub by one

Changes: https://git.openjdk.org/jdk/pull/21818/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21818&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343415
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/21818.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21818/head:pull/21818

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


More information about the hotspot-compiler-dev mailing list