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

Split nmethod unloading from inline cache cleaning

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17

      Backports

        Description

        Currently the GCs walk the code cache or otherwise visit nmethods to determine if the nmethod should be unloaded when their oops are not alive. The oops in nmethods are weak references. At the same time, the metadata is cleaned out of the nmethod inline caches and exception tables for classes that have been unloaded. In GC epilogue, for all GCs except G1, the code cache is walked again to clean out inline caches that refer to unloaded nmethods.

        This enhancement is provide separate functions for:
          1. walk code cache (or otherwise visit nmethods through nmethod tables) to pass the GC is_alive closure and determine whether the nmethod should be unloaded
          2. cleaning the nmethod from unloaded class metadata and unloaded nmethod.

        Essentially this moves cleaning unloaded class metadata into the phase of cleaning unloaded nmethods.

        G1 walks the nmethods for unloading with is_alive closure and also for cleaning nmethod metadata and unloaded nmethods. This refactoring doesn't change that.

        I filed this under runtime because I have the change, even though it's a combination of compiler and gc changes, mostly compiler changes

        Why do this? Separating these allows concurrency for each of these nmethod walking purposes.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                coleenp Coleen Phillimore
                Reporter:
                coleenp Coleen Phillimore
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: