RFR: 8357258: x86: Improve receiver type profiling reliability [v3]
Aleksey Shipilev
shade at openjdk.org
Wed Nov 26 10:37:03 UTC 2025
On Fri, 21 Nov 2025 19:48:21 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>>
>> - Merge branch 'master' into JDK-8357258-x86-c1-optimize-virt-calls
>> - Merge branch 'master' into JDK-8357258-x86-c1-optimize-virt-calls
>> - Drop atomic counters
>> - Initial version
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 4807:
>
>> 4805:
>> 4806: Register offset = rscratch1;
>> 4807: assert_different_registers(mdp, recv, offset);
>
> We also have `rscratch2` which we can use for registers shuffling in the following code.
Unfortunately not. I remember trying that and that did not work. I just added `rscratch2` here, and it immediately failed on this path:
Stack: [0x000078f046f00000,0x000078f047000000], sp=0x000078f046ffd350, free space=1012k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x9697f9] void assert_different_registers_impl<Register, Register, Register, Register>(char const*, int, Register, Register, Register, Register)+0xc9 (macroAssembler_x86.cpp:4799)
V [libjvm.so+0x1676bbd] MacroAssembler::type_profile(Register, Register, int)+0xad (macroAssembler_x86.cpp:4799)
V [libjvm.so+0x962da7] LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck*)+0x757 (c1_LIRAssembler_x86.cpp:1266)
V [libjvm.so+0x941a8c] LIR_OpTypeCheck::emit_code(LIR_Assembler*)+0x1c (c1_LIR.cpp:1023)
V [libjvm.so+0x95157e] LIR_Assembler::emit_lir_list(LIR_List*)+0xde (c1_LIRAssembler.cpp:301)
V [libjvm.so+0x951e66] LIR_Assembler::emit_code(BlockList*)+0xf6 (c1_LIRAssembler.cpp:266)
V [libjvm.so+0x8faef9] Compilation::emit_code_body()+0x189 (c1_Compilation.cpp:348)
V [libjvm.so+0x8fb41d] Compilation::compile_java_method()+0x3bd (c1_Compilation.cpp:409)
V [libjvm.so+0x8fbbee] Compilation::compile_method()+0x25e (c1_Compilation.cpp:471)
V [libjvm.so+0x8fc31f] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, bool, DirectiveSet*)+0x35f (c1_Compilation.cpp:600)
V [libjvm.so+0x8fdd7a] Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x20a (c1_Compiler.cpp:263)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25305#discussion_r2564452657
More information about the hotspot-compiler-dev
mailing list