-
JEP
-
Resolution: Delivered
-
P2
-
Jesper Wilhelmsson
-
Feature
-
Open
-
Implementation
-
-
S
-
S
-
156
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.
- is blocked by
-
JDK-8046112 JEP 122: Remove the Permanent Generation
-
- Closed
-
- relates to
-
JDK-8049421 G1 Class Unloading after completing a concurrent mark cycle
-
- Resolved
-
-
JDK-8064742 TOI: JEP 156: G1 GC: Reduce need for full GCs
-
- Closed
-
1.
|
Implement Class Unloading after completing a concurrent mark cycle |
|
Resolved | Unassigned | |
2.
|
Add flag to turn off G1 Class Unloading |
|
Resolved | Stefan Karlsson | |
3.
|
Improve performance of Code Root Migration |
|
Closed | Mikael Gerdin (Inactive) | |
4.
|
Backport all G1 Class Unloading changes to 8u40 |
|
Resolved | Stefan Karlsson | |
5.
|
Create TOI for SE |
|
Closed | Stefan Karlsson |