Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8229345

Memory leak due to vtable stubs not being shared on SPARC

XMLWordPrintable

    • b11
    • Not verified

        The code cache can be occupied by vtable stubs on SPARC.
        Since the vtable stubs are not deallocated[1], and not shared/reused in Solaris[2],
        it could get increased continuously and memory leaking is not negligible.

        One of the potential scenarios are continuous creation of class loaders.
        It causes excessive allocation and deallocation of nmethods. If call patterns are megamorphic, those nmethods will allocate corresponding vtable stubs for megamorphic inline cache transitions. While the nmethods are recycled, their vtable stubs are not

        It is reproducible in the JDK 14 and 11.

        [1] https://java.se.oracle.com/source/xref/jdk8u-cpu/hotspot/src/share/vm/code/vtableStubs.hpp#106
        [2] https://java.se.oracle.com/source/xref/jdk8u-cpu/hotspot/src/cpu/sparc/vm/globals_sparc.hpp#41

          1. Test2.java
            3 kB
            Yoshiki Sato
          2. test2.log
            43 kB
            Yoshiki Sato

              eosterlund Erik Österlund
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: