RFR: 8299570: [JVMCI] Insufficient error handling when CodeBuffer is exhausted
Tom Rodriguez
never at openjdk.org
Wed Jan 11 17:04:21 UTC 2023
On Wed, 11 Jan 2023 14:29:43 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> This PR fixes the handling of a full CodeBuffer when emitting stubs as part of JVMCI code installation.
Marked as reviewed by never (Reviewer).
src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp line 542:
> 540: JVMCI_ERROR_0("could not emit trampoline stub - code cache is full");
> 541: }
> 542: }
The if (stub == null) test below should be the else branch of this if which I think makes it clearer. Why do we even bother returning the stub?
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?
-------------
PR: https://git.openjdk.org/jdk/pull/11945
More information about the hotspot-compiler-dev
mailing list