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

Unified Diff: src/heap/spaces.cc

Issue 2644523002: [heap] Provide ObjectMarking with marking transitions (Closed)
Patch Set: Created 3 years, 11 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
« src/heap/mark-compact-inl.h ('K') | « src/heap/mark-compact-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 2e6ded546f45ecc33b2ff90b31d57d89d59685a3..b3ebd11d35fc78092aee6f414fcb1586bdf73d30 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2990,7 +2990,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
AllocationStep(object->address(), object_size);
if (heap()->incremental_marking()->black_allocation()) {
- Marking::MarkBlack(ObjectMarking::MarkBitFrom(object));
+ // We cannot use ObjectMarking here as the object still lacks a size.
Hannes Payer (out of office) 2017/01/18 14:43:35 This one is really unfortunate. However, we do not
Michael Lippautz 2017/01/18 15:58:07 Acknowledged.
+ Marking::WhiteToBlack(ObjectMarking::MarkBitFrom(object));
MemoryChunk::IncrementLiveBytes(object, object_size);
}
return object;
@@ -3039,9 +3040,8 @@ void LargeObjectSpace::ClearMarkingStateOfLiveObjects() {
LargePage* current = first_page_;
while (current != NULL) {
HeapObject* object = current->GetObject();
- MarkBit mark_bit = ObjectMarking::MarkBitFrom(object);
- DCHECK(Marking::IsBlack(mark_bit));
- Marking::BlackToWhite(mark_bit);
+ DCHECK(Marking::IsBlack(ObjectMarking::MarkBitFrom(object)));
+ ObjectMarking::BlackToWhite(object);
Page::FromAddress(object->address())->ResetProgressBar();
Page::FromAddress(object->address())->ResetLiveBytes();
current = current->next_page();
« src/heap/mark-compact-inl.h ('K') | « src/heap/mark-compact-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698