RFR: 8295724: VirtualMachineError: Out of space in CodeCache for method handle intrinsic [v6]
Martin Doerr
mdoerr at openjdk.org
Wed Nov 9 17:09:21 UTC 2022
On Wed, 9 Nov 2022 00:08:57 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> Does this also mean that nmethods for method handle intrinsics could previously get unloaded when they became "cold", and now if they are in NonNMethod they live forever? Someone could probably write a test that fills up NonNMethod with method handle intrinsics for various signatures by spinning up temporary classes with random signatures.
>
> IIRC the is_cold check returns false for method handle intrinsics. Mostly because it mimicked the sweeper heuristics for coldness. Having said that, the sweeper heuristics couldn't sample method handle intrinsics because they had no activation records and hence would always appear as cold even when they were not, while in the nmethod entry barrier heuristics for coldness, we would be able to to phase out cold method handle intrinsic nmethods. But I expect the amount of memory consumed by them to be rather small, so the magnitude of the win of going in that direction is questionable.
We were able to hit the `IsUnloadingBehaviour::is_unloading` problem! I'm testing a workaround, now.
Note that the Methods are also permanently kept in `_invoke_method_intrinsic_table`. Getting rid of method handle intrinsics is currently not supported.
-------------
PR: https://git.openjdk.org/jdk/pull/10933
More information about the hotspot-compiler-dev
mailing list