Commit cb68c2e3 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Filter out fillers in worklist during atomic pause marking

They are already filtered by the incremental marker.

Change-Id: If43a16d54a2b0eb7d6a36482d3439fc7191c31a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549160
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60583}
parent 42beed97
...@@ -764,10 +764,19 @@ intptr_t IncrementalMarking::ProcessMarkingWorklist( ...@@ -764,10 +764,19 @@ intptr_t IncrementalMarking::ProcessMarkingWorklist(
while (bytes_processed < bytes_to_process || completion == FORCE_COMPLETION) { while (bytes_processed < bytes_to_process || completion == FORCE_COMPLETION) {
HeapObject obj = marking_worklist()->Pop(); HeapObject obj = marking_worklist()->Pop();
if (obj.is_null()) break; if (obj.is_null()) break;
// Left trimming may result in white, grey, or black filler objects on the // Left trimming may result in grey or black filler objects on the marking
// marking deque. Ignore these objects. // worklist. Ignore these objects.
if (obj->IsFiller()) { if (obj->IsFiller()) {
DCHECK(!marking_state()->IsImpossible(obj)); // Due to copying mark bits and the fact that grey and black have their
// first bit set, one word fillers are always black.
DCHECK_IMPLIES(
obj->map() == ReadOnlyRoots(heap()).one_pointer_filler_map(),
marking_state()->IsBlack(obj));
// Other fillers may be black or grey depending on the color of the object
// that was trimmed.
DCHECK_IMPLIES(
obj->map() != ReadOnlyRoots(heap()).one_pointer_filler_map(),
marking_state()->IsBlackOrGrey(obj));
continue; continue;
} }
bytes_processed += VisitObject(obj->map(), obj); bytes_processed += VisitObject(obj->map(), obj);
......
...@@ -1702,7 +1702,21 @@ void MarkCompactCollector::ProcessMarkingWorklistInternal() { ...@@ -1702,7 +1702,21 @@ void MarkCompactCollector::ProcessMarkingWorklistInternal() {
HeapObject object; HeapObject object;
MarkCompactMarkingVisitor visitor(this, marking_state()); MarkCompactMarkingVisitor visitor(this, marking_state());
while (!(object = marking_worklist()->Pop()).is_null()) { while (!(object = marking_worklist()->Pop()).is_null()) {
DCHECK(!object->IsFiller()); // Left trimming may result in grey or black filler objects on the marking
// worklist. Ignore these objects.
if (object->IsFiller()) {
// Due to copying mark bits and the fact that grey and black have their
// first bit set, one word fillers are always black.
DCHECK_IMPLIES(
object->map() == ReadOnlyRoots(heap()).one_pointer_filler_map(),
marking_state()->IsBlack(object));
// Other fillers may be black or grey depending on the color of the object
// that was trimmed.
DCHECK_IMPLIES(
object->map() != ReadOnlyRoots(heap()).one_pointer_filler_map(),
marking_state()->IsBlackOrGrey(object));
continue;
}
DCHECK(object->IsHeapObject()); DCHECK(object->IsHeapObject());
DCHECK(heap()->Contains(object)); DCHECK(heap()->Contains(object));
DCHECK(!(marking_state()->IsWhite(object))); DCHECK(!(marking_state()->IsWhite(object)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment