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

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

Issue 2796233003: [heap] Evacuation for young generation (Closed)
Patch Set: Fix recording Created 3 years, 8 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 c71328cc508423e2b972851fb3a66bc570aa4f4e..2405938f3171b04d3b55a93296a1012695473b25 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -185,17 +185,20 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to);
+ template <MarkBit::AccessMode access_mode = MarkBit::NON_ATOMIC>
V8_INLINE static void TransferColor(HeapObject* from, HeapObject* to) {
Michael Lippautz 2017/04/21 07:05:51 TransferColor might work concurrently in new space
Hannes Payer (out of office) 2017/04/21 14:46:26 I guess you do not need to synchronize.
Michael Lippautz 2017/04/24 13:15:08 We need to synchronize for live byte count which i
- if (ObjectMarking::IsBlack(to, MarkingState::Internal(to))) {
+ if (ObjectMarking::IsBlack<access_mode>(to, MarkingState::Internal(to))) {
DCHECK(to->GetHeap()->incremental_marking()->black_allocation());
return;
}
- DCHECK(ObjectMarking::IsWhite(to, MarkingState::Internal(to)));
- if (ObjectMarking::IsGrey(from, MarkingState::Internal(from))) {
- ObjectMarking::WhiteToGrey(to, MarkingState::Internal(to));
- } else if (ObjectMarking::IsBlack(from, MarkingState::Internal(from))) {
- ObjectMarking::WhiteToBlack(to, MarkingState::Internal(to));
+ DCHECK(ObjectMarking::IsWhite<access_mode>(to, MarkingState::Internal(to)));
+ if (ObjectMarking::IsGrey<access_mode>(from,
+ MarkingState::Internal(from))) {
+ ObjectMarking::WhiteToGrey<access_mode>(to, MarkingState::Internal(to));
+ } else if (ObjectMarking::IsBlack<access_mode>(
+ from, MarkingState::Internal(from))) {
+ ObjectMarking::WhiteToBlack<access_mode>(to, MarkingState::Internal(to));
}
}

Powered by Google App Engine
This is Rietveld 408576698