RFR: 8295724: VirtualMachineError: Out of space in CodeCache for method handle intrinsic
Dean Long
dlong at openjdk.org
Wed Nov 2 20:22:36 UTC 2022
On Tue, 1 Nov 2022 13:13:46 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> This proposal prevents the VM from terminating unexpectedly in some rare cases (see JBS issue). It allows using NonNMethod code space for method handle intrinsics which are needed urgently if the other code cache spaces are full. There are other options (see JBS issue), but this one appears to be the simplest one.
I believe the calling convention issues would be handled by the c2i adapter. We already force calling from the interpreter to use the i2c adapter. It looks like the problem with falling back to interpreter intrinsics is _linkToNative, which is missing. All platforms only generate it for compiled. From code comments, it seems like this was an implementation short-cut and falls under technical debt. Here is my suggestion:
1. File an RFE to support _linkToNative interpreter intrinsic, fallback to interpreted through c2i adapter
2. Proceed with this PR as a stop-gap
For this PR, it would be reassuring to assert that any nmethods added to NonNMethod have no oops and no inlined caches, which probably also implies no metadata and no relocations. Also, I would really like a test that reproduces the problem. Would using -XX:-MethodFlushing -XX:-UseCodeCacheFlushing help with that?
-------------
PR: https://git.openjdk.org/jdk/pull/10933
More information about the hotspot-compiler-dev
mailing list