RFR: 8358655: AArch64: Simplify Interpreter::profile_taken_branch

Aleksey Shipilev shade at openjdk.org
Fri Jun 20 08:48:30 UTC 2025


On Thu, 19 Jun 2025 21:17:30 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

> [JDK-8358655](https://bugs.openjdk.org/browse/JDK-8358655)
> 
> The aarch64 version of [JDK-8357434](https://bugs.openjdk.org/browse/JDK-8357434)
> 
> The counter is 64-bit, never practically overflows, and no other code cares about it so it is safe to remove
> 
> Additional Testing:
> - [x] Linux aarch64 fastdebug tier 1
> - [x] Linux aarch64 fastdebug tier 2
> - [x] Linux aarch64 fastdebug tier 3
> - [x] Linux aarch64 fastdebug tier 4

Looks fine. I also think `r1` saves are now unnecessary, right, @theRealAph?


    // ECN: FIXME: This code smells
    // check if MethodCounters exists
    Label has_counters;
    __ ldr(rscratch1, Address(rmethod, Method::method_counters_offset()));
    __ cbnz(rscratch1, has_counters);
    __ push(r0);
    __ push(r1); // <--- here
    __ push(r2);
    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
            InterpreterRuntime::build_method_counters), rmethod);
    __ pop(r2);
    __ pop(r1);  // <--- here
    __ pop(r0);

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25906#pullrequestreview-2945067009


More information about the hotspot-compiler-dev mailing list