The code trying to make sure there is space to allocate in after a young collections looks a bit backwards. Currently we have three levels of fall back full GCs doing like this:
1. Upgraded no free regions, will clear soft references, not maximal
2. Satisfy failed alloc #1, will not clearing soft references, not maximal
3. Satisfy failed alloc #2, will clear soft references and maximal
To me it would feel more natural to have:
1. Upgraded, not clear, not maximal
2. Satisfy #1, clear, not maximal
3. Satisfy #2, clear and maximal
We need to investigate this a bit to make sure there is not important reason for clearing the soft references in the first "upgraded" full GC.
1. Upgraded no free regions, will clear soft references, not maximal
2. Satisfy failed alloc #1, will not clearing soft references, not maximal
3. Satisfy failed alloc #2, will clear soft references and maximal
To me it would feel more natural to have:
1. Upgraded, not clear, not maximal
2. Satisfy #1, clear, not maximal
3. Satisfy #2, clear and maximal
We need to investigate this a bit to make sure there is not important reason for clearing the soft references in the first "upgraded" full GC.
- relates to
-
JDK-8268390 G1 concurrent gc upgrade to full gc not working
-
- Resolved
-
-
JDK-8268393 Consolidate upgrade to full gc paths in G1
-
- Open
-