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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 2888093003: [heap] Add GN flag for enabling concurrent marking. (Closed)
Patch Set: infer runtime flag from compile time flag Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/concurrent-marking.h" 10 #include "src/heap/concurrent-marking.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 marking_deque()->Push(obj); 134 marking_deque()->Push(obj);
135 return true; 135 return true;
136 } 136 }
137 return false; 137 return false;
138 } 138 }
139 139
140 void IncrementalMarking::MarkBlackAndPush(HeapObject* obj) { 140 void IncrementalMarking::MarkBlackAndPush(HeapObject* obj) {
141 // Color the object black and push it into the bailout deque. 141 // Color the object black and push it into the bailout deque.
142 ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj)); 142 ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj));
143 if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) { 143 if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) {
144 #if V8_CONCURRENT_MARKING 144 #ifdef V8_CONCURRENT_MARKING
145 marking_deque()->Push(obj, MarkingThread::kMain, TargetDeque::kBailout); 145 marking_deque()->Push(obj, MarkingThread::kMain, TargetDeque::kBailout);
146 #else 146 #else
147 if (!marking_deque()->Push(obj)) { 147 if (!marking_deque()->Push(obj)) {
148 ObjectMarking::BlackToGrey<kAtomicity>(obj, marking_state(obj)); 148 ObjectMarking::BlackToGrey<kAtomicity>(obj, marking_state(obj));
149 } 149 }
150 #endif 150 #endif
151 } 151 }
152 } 152 }
153 153
154 void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from, 154 void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from,
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 idle_marking_delay_counter_++; 1224 idle_marking_delay_counter_++;
1225 } 1225 }
1226 1226
1227 1227
1228 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1228 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1229 idle_marking_delay_counter_ = 0; 1229 idle_marking_delay_counter_ = 0;
1230 } 1230 }
1231 1231
1232 } // namespace internal 1232 } // namespace internal
1233 } // namespace v8 1233 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698