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

Memory leak due to vtable stubs not being shared on SPARC

    Details

    • Subcomponent:
    • Resolved In Build:
      b11
    • Verification:
      Not verified

      Backports

        Description

        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

          Attachments

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

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: