RFR: 8359801: RISC-V: Simplify Interpreter::profile_taken_branch

Fei Yang fyang at openjdk.org
Fri Jun 20 02:12:34 UTC 2025


On Tue, 17 Jun 2025 08:41:41 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:

> Do the same thing as [JDK-8357434](https://bugs.openjdk.org/browse/JDK-8357434) [JDK-8358655](https://bugs.openjdk.org/browse/JDK-8358655) but for riscv
> 
> The Interpreter::profile_taken_branch has the same sbbptr pattern  with [JDK-8358105](https://bugs.openjdk.org/browse/JDK-8358105),The counter is 64-bit, never practically overflows , and no other code cares about it. so we can remove the overflows check

Looks fine modulo one minor comment. Thanks.

src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 1059:

> 1057:     // If no method data exists, go to profile_continue.
> 1058:     // Otherwise, assign to mdp
> 1059:     test_method_data_pointer(mdp, profile_continue);

Nit: Can you remove the preceding code comment like the other platforms?
`// Otherwise, assign to mdp`

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

PR Review: https://git.openjdk.org/jdk/pull/25848#pullrequestreview-2944364120
PR Review Comment: https://git.openjdk.org/jdk/pull/25848#discussion_r2157903344


More information about the hotspot-compiler-dev mailing list