RFR: 8357258: x86: Improve receiver type profiling reliability [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Sep 19 16:33:46 UTC 2025
On Wed, 17 Sep 2025 23:24:16 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8357258-x86-c1-optimize-virt-calls
>> - Drop atomic counters
>> - Initial version
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 4853:
>
>> 4851: } else {
>> 4852: // Nothing to do, just go with defaults.
>> 4853: assert_different_registers(rax, mdp, recv, offset);
>
> Can't we do all register shuffling and push/pop outside the loop?
I remember having an initial version that did it, but the code ended up even hairier and inefficient, because: a) there are different exits from the loop; b) in majority of cases we do not need to do any shuffling (e.g. none of the registers in questions are not `rax`); c) it also caused some branches to become un-shortened. For this profiling stencil, every instruction counts :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25305#discussion_r2363548849
More information about the hotspot-compiler-dev
mailing list