RFR: 8295724: VirtualMachineError: Out of space in CodeCache for method handle intrinsic [v6]

Dean Long dlong at openjdk.org
Mon Nov 7 22:43:25 UTC 2022


On Sat, 5 Nov 2022 19:27:45 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.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Need to ignore own Method when using metadata_do.

src/hotspot/share/code/nmethod.cpp line 512:

> 510:       nm->oops_do(&cfo);
> 511:       assert(!cfo.found_oop(), "no oops allowed");
> 512:       CheckForMetadataClosure cfm(/* ignore reference to own Method */ nm->method());

If we are going to ignore method(), then how about checking that it's classloader is parmanent (ClassLoaderData::is_permanent_class_loader_data)?  We also might need a review by a GC expert.  @fisk, do you agree it is safe to put nmethod in NonNMethod space given the above checks?

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

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


More information about the hotspot-compiler-dev mailing list