Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: src/incremental-marking.cc

Issue 8230009: Adjust assertions in the incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use IsFiller instead of IsFreeSpace to cover two pointer fillers Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 6cb7aa4858d80ca1e096a14b06d862a3a1b8e46a..6ecf553d9543026445f259bc60a78db054e3411b 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -517,7 +517,11 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() {
array[new_top] = dest;
new_top = ((new_top + 1) & mask);
ASSERT(new_top != marking_deque_.bottom());
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(obj)));
+#ifdef DEBUG
+ MarkBit mark_bit = Marking::MarkBitFrom(obj);
+ ASSERT(Marking::IsGrey(mark_bit) ||
+ (obj->IsFiller() && Marking::IsWhite(mark_bit)));
+#endif
}
} else if (obj->map() != filler_map) {
// Skip one word filler objects that appear on the
@@ -525,7 +529,11 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() {
array[new_top] = obj;
new_top = ((new_top + 1) & mask);
ASSERT(new_top != marking_deque_.bottom());
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(obj)));
+#ifdef DEBUG
+ MarkBit mark_bit = Marking::MarkBitFrom(obj);
+ ASSERT(Marking::IsGrey(mark_bit) ||
+ (obj->IsFiller() && Marking::IsWhite(mark_bit)));
+#endif
}
}
marking_deque_.set_top(new_top);
@@ -710,7 +718,6 @@ void IncrementalMarking::Step(intptr_t allocated_bytes) {
Map* map = obj->map();
if (map == filler_map) continue;
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(obj)));
int size = obj->SizeFromMap(map);
bytes_to_process -= size;
MarkBit map_mark_bit = Marking::MarkBitFrom(map);
@@ -733,7 +740,8 @@ void IncrementalMarking::Step(intptr_t allocated_bytes) {
}
MarkBit obj_mark_bit = Marking::MarkBitFrom(obj);
- ASSERT(!Marking::IsBlack(obj_mark_bit));
+ ASSERT(Marking::IsGrey(obj_mark_bit) ||
+ (obj->IsFiller() && Marking::IsWhite(obj_mark_bit)));
Marking::MarkBlack(obj_mark_bit);
MemoryChunk::IncrementLiveBytes(obj->address(), size);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698