RFR: 8299570: [JVMCI] Insufficient error handling when CodeBuffer is exhausted

Tom Rodriguez never at openjdk.org
Tue Jan 17 19:17:22 UTC 2023


On Tue, 17 Jan 2023 18:31:11 GMT, Tom Shull <duke at openjdk.org> wrote:

>> src/hotspot/share/jvmci/jvmciCodeInstaller.cpp line 1181:
>> 
>>> 1179:     if (_next_call_type == INVOKESTATIC || _next_call_type == INVOKESPECIAL) {
>>> 1180:       // Need a static call stub for transitions from compiled to interpreted.
>>> 1181:       if (CompiledStaticCall::emit_to_interp_stub(buffer, _instructions->start() + pc_offset) == nullptr) {
>> 
>> We use estimate_stubs_size to presize the buffer to include space for these so it should never fail I think, but we should be checking anyway.  Maybe estimate_stubs_size should be computing space for the aarch64 trampolines?
>
> it looks like estimate_stubs_size is computing space for the trampolines via 
> 
> `size += trampoline_stubs * CompiledStaticCall::to_trampoline_stub_size();`?

It seems like the estimate agrees with the code emitted for the trampoline, so we either have a general problem in this computation or we have some other unexpected use of code cache space.  It isn't critical that we get this estimate right but we do try to avoid resizing during code installation as it can be expensive.

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

PR: https://git.openjdk.org/jdk/pull/11945


More information about the hotspot-compiler-dev mailing list