RFR: 8343767: Enumerate StubGen blobs, stubs and entries and generate code from declarations [v13]
Fei Yang
fyang at openjdk.org
Thu Jan 30 12:53:58 UTC 2025
On Wed, 29 Jan 2025 17:21:17 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> I see compiler/arguments/TestCodeEntryAlignment.java failures on x64.
>>
>>
>> # Internal Error (.../src/hotspot/share/asm/codeBuffer.hpp:200), pid=1218011, tid=1218066
>> # assert(allocates2(pc)) failed: not in CodeBuffer memory: 0x00007f52b412a000 <= 0x00007f52b413e141 <= 0x00007f52b413e140
>>
>> Command Line: -XX:+UnlockExperimentalVMOptions -XX:CodeCacheSegmentSize=1024 -XX:CodeEntryAlignment=1024 compiler.arguments.TestCodeEntryAlignment run
>>
>> Current thread (0x00007f52c422b220): JavaThread "C2 CompilerThread0" daemon [_thread_in_vm, id=1218066, stack(0x00007f52a4f9b000,0x00007f52a509b000) (1024K)]
>>
>> V [libjvm.so+0x68c7b0] Assembler::vmovdqu(Address, XMMRegister)+0x250 (codeBuffer.hpp:200)
>> V [libjvm.so+0x1390ed3] MacroAssembler::vmovdqu(Address, XMMRegister)+0x73 (macroAssembler_x86.cpp:2663)
>> V [libjvm.so+0x176f4d5] StubGenerator::generate_base64_encodeBlock()+0x955 (stubGenerator_x86_64.cpp:2081)
>> V [libjvm.so+0x1777c7d] StubGenerator::generate_compiler_stubs()+0x5cd (stubGenerator_x86_64.cpp:4296)
>> V [libjvm.so+0x17795e8] StubGenerator_generate(CodeBuffer*, StubGenBlobId)+0xe8 (stubGenerator_x86_64.cpp:4421)
>> V [libjvm.so+0x17d2ff8] initialize_stubs(StubGenBlobId, int, int, char const*, char const*, char const*) [clone .constprop.0]+0xe8 (stubRoutines.cpp:233)
>> V [libjvm.so+0x17d55fc] compiler_stubs_init(bool)+0x9c (stubRoutines.cpp:264)
>> ...
>
> @iwanowww @TheRealMDoerr The x86 failure happens when the test sets code cache segment size and alignment both to 1024. There are so many stubs in the compiler blob on x86_64 that this requires an extra 8000 bytes to be added to the current blob size. The slop for this case is only 900 bytes but the test is a fairly unrealistic scenario. With both values set to 512 we have over 13000 bytes of slop. So, I think I have added enough for realistic purposes.
@adinn : Witnessed build errors after this change. Seems that this PR needs rebase before merging. It's strange that the bot didn't catch the merge conflicts in files like `src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp` or `src/hotspot/cpu/riscv/stubGenerator_riscv.cpp`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21957#issuecomment-2624430632
More information about the hotspot-dev
mailing list