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

Erik Österlund eosterlund at openjdk.org
Wed Nov 9 00:11:05 UTC 2022


On Tue, 8 Nov 2022 19:53:13 GMT, Dean Long <dlong at openjdk.org> wrote:

>> So, calling `IsUnloadingBehaviour::is_unloading` is unsafe. Should we only call it when `is_permanent_class_loader_data()` for the method returns false?
>
> 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.

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

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


More information about the hotspot-compiler-dev mailing list