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

Unified Diff: src/heap/incremental-marking.h

Issue 2160613002: [heap] Remove black pages and use black areas instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: disable black allocation Created 4 years, 5 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
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index 7ecbf3581e1dc8b7b2d09cd7a01af2b05c69a9e7..8d3432b104d633945b042b1831b24e70c60be1d3 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -209,20 +209,24 @@ class IncrementalMarking {
static void TransferMark(Heap* heap, Address old_start, Address new_start);
// Returns true if the transferred color is black.
- INLINE(static bool TransferColor(HeapObject* from, HeapObject* to)) {
- if (Page::FromAddress(to->address())->IsFlagSet(Page::BLACK_PAGE))
- return true;
+ INLINE(static void TransferColor(HeapObject* from, HeapObject* to,
+ int size)) {
MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from);
MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to);
+
+ if (Marking::IsBlack(to_mark_bit)) {
+ DCHECK(to->GetHeap()->incremental_marking()->black_allocation());
+ return;
+ }
+
DCHECK(Marking::IsWhite(to_mark_bit));
if (from_mark_bit.Get()) {
to_mark_bit.Set();
if (from_mark_bit.Next().Get()) {
to_mark_bit.Next().Set();
- return true;
+ MemoryChunk::IncrementLiveBytesFromGC(to, size);
ulan 2016/07/19 13:23:32 This side-effect of the function is unexpected. Wh
Hannes Payer (out of office) 2016/07/19 14:42:53 As discussed offline. I will do this change in a s
}
}
- return false;
}
void IterateBlackObject(HeapObject* object);

Powered by Google App Engine
This is Rietveld 408576698