RFR: 8058176: [mlvm] tests should not allow code cache exhaustion [v2]

Evgeny Nikitin enikitin at openjdk.java.net
Wed Mar 10 14:26:07 UTC 2021


On Wed, 10 Mar 2021 14:12:41 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:

>> I don't see a compelling reason why method handle linkers have to be nmethods and live in 'profiled'/'non-profiled' code heaps. I think the reason why it works that way now is the linkers are treated as ordinary native wrappers (since linker methods are just signature-polymorphic native static methods declared on `java.lang.invoke.MethodHandle` class). But native wrappers are represented as `nmethod`s for a reason: they can be unloaded along with the class. 
>> It's not the case with MH linkers which aren't unloaded at all. 
>> 
>> Please, file an RFE if you find it desirable to put MH linkers into 'non-nmethods' heap.
>
> Raised the RFE: https://bugs.openjdk.java.net/browse/JDK-8263377

Here's the rationale behind the non-nmethods heap monitoring: the test i2c_c2i that fills up that heap. The test was started with 8MB per each heap, and consumed all the non-nmethods one. The consumption speed diminishes quickly after ~10 MB, but with the limits of 8 MB (stated in the case) we can hit the Error:

    Heaps statistics: [non-nm: 1.8 MiB : 22%][profiled: 781.3 KiB : 9%][non-profiled: 189.3 KiB : 2%]
    ...
    Heaps statistics: [non-nm: 8.0 MiB : 99%][profiled: 3.0 MiB : 37%][non-profiled: 8.0 MiB : 99%]

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

PR: https://git.openjdk.java.net/jdk/pull/2523


More information about the hotspot-dev mailing list