RFR: 8358105: RISC-V: Optimize interpreter profile updates

Anjian Wen wenanjian at openjdk.org
Tue Jun 3 08:46:02 UTC 2025


The reason of this patch is same as the x86 and aarch64 but for riscv
[JDK-8356946](https://bugs.openjdk.org/browse/JDK-8356946)
[JDK-8357223](https://bugs.openjdk.org/browse/JDK-8357223)

> First, we carry the implementation for counter decrements without using them. This is dead code, and can be purged. Second, we care about overflows for 64-bit for some reason. I think this is a reminiscent of 32-bit x86 support, where we can plausibly have 32-bit counter overflow in a reasonable timeframe. But for 64-bit counter, we need tens of years of constantly bashing the counter to get it to overflow. No other profile counter update code, e.g. in C1, cares about this.

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

Commit messages:
 - delete useless func declare and add assert back
 - RISCV: Optimize interpreter profile updates

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

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


More information about the hotspot-compiler-dev mailing list