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 @@ -65,13 +65,13 @@ static int arrayBaseOffset() {
}

@Uninterruptible(reason = CALLED_FROM_UNINTERRUPTIBLE_CODE, mayBeInlined = true)
public static void writeFillerObjectAt(Pointer p, UnsignedWord size) {
public static void writeFillerObjectAt(Pointer p, UnsignedWord size, boolean rememberedSet) {
assert size.aboveThan(0);
if (size.aboveOrEqual(arrayMinSize())) {
int length = UnsignedUtils.safeToInt(size.subtract(arrayBaseOffset()).unsignedDivide(ARRAY_ELEMENT_SIZE));
FormatArrayNode.formatArray(p, ARRAY_CLASS, length, true, false, WITH_GARBAGE_IF_ASSERTIONS_ENABLED, false);
FormatArrayNode.formatArray(p, ARRAY_CLASS, length, rememberedSet, false, WITH_GARBAGE_IF_ASSERTIONS_ENABLED, false);
} else {
FormatObjectNode.formatObject(p, FillerObject.class, true, WITH_GARBAGE_IF_ASSERTIONS_ENABLED, false);
FormatObjectNode.formatObject(p, FillerObject.class, rememberedSet, WITH_GARBAGE_IF_ASSERTIONS_ENABLED, false);
}
assert LayoutEncoding.getSizeFromObjectInGC(p.toObject()).equal(size);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ private static boolean verifyObject(Object obj, AlignedHeader aChunk, UnalignedH
Log.log().string("Object ").zhex(ptr).string(" is in ").string(space.getName()).string(" chunk ").zhex(chunk).string(" but does not have a remembered set.").newline();
return false;
}
} else if (space.isYoungSpace()) {
if (SerialGCOptions.useRememberedSet() && RememberedSet.get().hasRememberedSet(header)) {
Log.log().string("Object ").zhex(ptr).string(" is in ").string(space.getName()).string(" chunk ").zhex(chunk).string(" but has a remembered set.").newline();
return false;
}
}

return verifyReferences(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private static void insertFiller(ThreadLocalAllocation.Descriptor tlab) {
UnsignedWord size = hardEnd.subtract(top);

if (top.belowThan(hardEnd)) {
FillerObjectUtil.writeFillerObjectAt(top, size);
FillerObjectUtil.writeFillerObjectAt(top, size, false);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public boolean visit(Pointer objSeq, UnsignedWord size, Pointer newAddress, Poin
if (nextObjSeq.isNonNull()) {
Pointer gapStart = objSeq.add(size);
assert gapStart.belowThan(nextObjSeq);
FillerObjectUtil.writeFillerObjectAt(gapStart, nextObjSeq.subtract(gapStart));
FillerObjectUtil.writeFillerObjectAt(gapStart, nextObjSeq.subtract(gapStart), true);
// Note that we have already added first object table entries for fillers during fixup.
} else {
AlignedHeapChunk.AlignedHeader chunk = AlignedHeapChunk.getEnclosingChunkFromObjectPointer(objSeq);
Expand Down