Skip to content

Commit 305e44d

Browse files
committed
Adopt JDK-8319713: avoid conservative full GC after successful young GC.
1 parent f6f7307 commit 305e44d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/AdaptiveCollectionPolicy.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,7 @@ public boolean shouldCollectCompletely(boolean followingIncrementalCollection) {
190190
return true;
191191
}
192192

193-
UnsignedWord youngUsed = HeapImpl.getHeapImpl().getYoungGeneration().getChunkBytes();
194-
UnsignedWord oldUsed = HeapImpl.getHeapImpl().getOldGeneration().getChunkBytes();
195-
196-
/*
197-
* If the remaining free space in the old generation is less than what is expected to be
198-
* needed by the next collection, do a full collection now.
199-
*/
200-
UnsignedWord averagePromoted = UnsignedUtils.fromDouble(avgPromoted.getPaddedAverage());
201-
UnsignedWord promotionEstimate = UnsignedUtils.min(averagePromoted, youngUsed);
202-
UnsignedWord oldFree = oldSize.subtract(oldUsed);
203-
return promotionEstimate.aboveThan(oldFree);
193+
return false;
204194
}
205195

206196
private void updateAverages(boolean isSurvivorOverflow, UnsignedWord survivedChunkBytes, UnsignedWord promotedChunkBytes) {

0 commit comments

Comments
 (0)