Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,17 @@ private void fixupReferencesBeforeCompaction(ChunkReleaser chunkReleaser, Timers
oldFixupAlignedChunksTimer.stop();
}

/*
* Check each unaligned object and fix its references if the object is marked. Add the chunk
* to the releaser's list in case the object is not marked and therefore won't survive.
*/
Timer oldFixupUnalignedChunksTimer = timers.oldFixupUnalignedChunks.start();
try {
fixupUnalignedChunkReferences(chunkReleaser);
} finally {
oldFixupUnalignedChunksTimer.stop();
}

Timer oldFixupImageHeapTimer = timers.oldFixupImageHeap.start();
try {
for (ImageHeapInfo info : HeapImpl.getImageHeapInfos()) {
Expand Down Expand Up @@ -374,17 +385,6 @@ private void fixupReferencesBeforeCompaction(ChunkReleaser chunkReleaser, Timers
oldFixupStackTimer.stop();
}

/*
* Check each unaligned object and fix its references if the object is marked. Add the chunk
* to the releaser's list in case the object is not marked and therefore won't survive.
*/
Timer oldFixupUnalignedChunksTimer = timers.oldFixupUnalignedChunks.start();
try {
fixupUnalignedChunkReferences(chunkReleaser);
} finally {
oldFixupUnalignedChunksTimer.stop();
}

Timer oldFixupRuntimeCodeCacheTimer = timers.oldFixupRuntimeCodeCache.start();
try {
if (RuntimeCompilation.isEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ private static boolean maybeUpdateForwardedReference(Reference<?> dr, Pointer re
@Uninterruptible(reason = "Called from uninterruptible code.", mayBeInlined = true)
private static boolean willSurviveThisCollection(Object obj) {
if (SerialGCOptions.useCompactingOldGen() && GCImpl.getGCImpl().isCompleteCollection()) {
// Only for discovery, during processing for enqueuing mark status is already cleared
return ObjectHeaderImpl.isMarked(obj);
}
HeapChunk.Header<?> chunk = HeapChunk.getEnclosingHeapChunk(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public static void walkObjectsForFixup(AlignedHeapChunk.AlignedHeader chunk, Obj
while (p.notEqual(objSeqEnd)) {
assert p.belowThan(objSeqEnd);
Object obj = p.toObjectNonNull();
ObjectHeaderImpl.unsetMarkedAndKeepRememberedSetBit(obj);
UnsignedWord objSize = LayoutEncoding.getSizeFromObjectInlineInGC(obj);

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static void visitObjectReference(Pointer objRef, boolean compressed, Obj
|| holderObject == null // references from CodeInfo, invalidated or weak
|| holderObject instanceof Reference<?>; // cleared referent

Object obj = newLocation.toObjectNonNull();
Object obj = newLocation.toObject();
ReferenceAccess.singleton().writeObjectAt(objRef, obj, compressed);
}
// Note that image heap cards have already been cleaned and re-marked during the scan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ public boolean visitChunk(AlignedHeapChunk.AlignedHeader chunk) {
}

if (ObjectHeaderImpl.isMarkedHeader(header)) {
ObjectHeaderImpl.unsetMarkedAndKeepRememberedSetBit(p.toObjectNonNull());

/*
* Adding the optional identity hash field would increase an object's size, so we
* should have copied all objects that need one during marking instead.
Expand Down