RFR: 8357434: x86: Simplify Interpreter::profile_taken_branch
Vladimir Ivanov
vlivanov at openjdk.org
Tue May 27 19:22:52 UTC 2025
On Wed, 21 May 2025 08:23:14 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Noticed that `Interpreter::profile_taken_branch` has the same `sbbptr` pattern we have eliminated with [JDK-8356946](https://bugs.openjdk.org/browse/JDK-8356946). The same logic applies here: the counter is 64-bit, never practically overflows, and no other code cares about it.
>
> Also tidied up some comments around it.
>
> Additional testing;
> - [x] Linux x86_64 server fastdebug, `tier1 tier2`
src/hotspot/cpu/x86/templateTable_x86.cpp line 1690:
> 1688: void TemplateTable::branch(bool is_jsr, bool is_wide) {
> 1689: __ get_method(rcx); // rcx holds method
> 1690: __ profile_taken_branch(rax); // rax holds updated MDP
Stale comment at line 1741? Otherwise, looks good.
if (UseLoopCounter) {
// increment backedge counter for backward branches
// rax: MDO
// rbx: MDO bumped taken-count
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25343#discussion_r2110003697
More information about the hotspot-compiler-dev
mailing list