On Mon, 30 Mar 2026 14:01:00 GMT, Aleksey Shipilev <[email protected]> wrote:
>> Andrew Haley has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Fix up any out-of-range offsets
>
> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 1271:
>
>> 1269: int profile_capture_ratio = ProfileCaptureRatio;
>> 1270: int ratio_shift = exact_log2(profile_capture_ratio);
>> 1271: auto threshold = (1ull << 32) >> ratio_shift;
>
> Is this just `auto threshold = 1 << (32 - ratio_shift)`?
Why use this here when you use the following simpler approach lower down?
uint64_t threshold = (UCONST64(1) << 32) >> ratio_shift;
> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 2563:
>
>> 2561: __ adjust_mdo_address(&counter_address, dest_opr->type());
>> 2562: }
>> 2563: if (step->is_register()) {
>
> I remember looking at this before. Do we even have the cases where step is
> not a constant? Might simplify some code...
I believe with `increment_backedge_counter_conditionally` the step is a reg
assigned via a cmove.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28541#discussion_r3020860123
PR Review Comment: https://git.openjdk.org/jdk/pull/28541#discussion_r3020998910