RFR: 8286865: vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java fails with Out of space in CodeCache

Andrey Turbanov aturbanov at openjdk.org
Tue Aug 19 14:18:38 UTC 2025


On Tue, 19 Aug 2025 10:02:05 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:

> MethodHandle invocations with Xcomp are filling up CodeCache quickly in the test, especially in machines with high number of processors.
> It is possible to measure code cache consumption per invocation, estimate overall consumption and bail out before CodeCache runs out of memory.
> But it is much simpler to exclude the test for Xcomp flag.
> 
> Additional Change: MethodHandles.lookup was done unnecessarily invoked for all iterations. Replaced it with single invocation.
> 
> PS: This issue is not seen in JDK 20 and above, possibly due to JDK-8290025, but the exclusion guards against vagaries of CodeCache management.

test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java line 79:

> 77:                 "calledFromNative",
> 78:                 MT_calledFromNative);
> 79:         } catch(Exception ex) {

Suggestion:

        } catch (Exception ex) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26840#discussion_r2285421999


More information about the hotspot-compiler-dev mailing list