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

JEP 156: G1 GC: Reduce need for full GCs

    XMLWordPrintable

Details

    • Jesper Wilhelmsson
    • Feature
    • Open
    • gc
    • Implementation
    • hotspot dash gc dash dev at openjdk dot java dot net
    • S
    • S
    • 156

    Description

      Summary

      Enhance G1 so that it does not rely on full GCs to perform class unloading or any other critical operations.

      Description

      The goal of G1 is to minimize pause times without constraining the heap size or the amount of live data. This is achieved by doing a large part of the GC work concurrently and also doing partial compaction. Avoiding doing full GCs (_i.e., stop-the-world GCs) is one of the major benefits of G1.

      However, currently G1 relies on full GCs to unload classes. This causes a major issue with large applications that do redeployment or generate temporary classes via reflection. We need to implement class unloading without full GC in G1 to fix this. This project will enhance G1 to do class unloading at the end of concurrent marking cycles.

      We will also investigate if there are other important features that depend on full GC that might cause similar problems for G1.

      Testing

      When testing this we need to remember to play around with all kinds of references to class loaders. Not just plain class loading in Java, but also JNI and reflection. Class redefinition could also exercise this code in unusual ways.

      Risks and Assumptions

      Implementing class unloading in G1 will present some new problem areas for which we have not yet finalized a solution. One example is the interaction between class unloading and "snapshot-at-the-beginning" (SATB). It may turn out to be more tricky than we have anticipated, making this a medium effort.

      Dependences

      This project is not immediately dependent on the removal of the permanent generation ( JEP 122 ), but the implementation of class unloading in G1 will be simplified by that work, so it makes sense to wait with this project until the permanent generation is gone.

      Attachments

        Issue Links

          Activity

            People

              pssu Paul Su
              jwilhelm Jesper Wilhelmsson
              Stefan Karlsson Stefan Karlsson
              Jon Masamitsu (Inactive), Tony Printezis
              Mikael Vidstedt
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: