JDK 17 | JDK 20 |
---|---|
17.0.7-oracleFixed | 20 b27Fixed |
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
We were testing an application with small code cache (-XX:ReservedCodeCacheSize=20000000) and enabled segmentation (-XX:+SegmentedCodeCache). The JIT compilers have filled up both, the space for non-profiled nmethods and the one for profiled nmethods, and then, the JIT compilers got switched off as intended by the test (it is a stress test for exactly this situation). After the sweeper removal (JDK-8290025), the VM terminates with "java.lang.VirtualMachineError: Out of space in CodeCache for method handle intrinsic". Unlike normal JIT compiled Java methods, method handle intrinsics are strictly required by the VM, so we should try harder to get them created. They are allocated in the non-profiled space and alternatively in the profiled space. In the situation of the test, unloading is already requested ("_unloading_threshold_gc_requested"), but not yet done. We could wait for the GC to do the job or reserve some space. Or allocate in NonNMethod space.
|