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

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

Issue 1128683006: Don't UnshiftGrey any black objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap/incremental-marking.h" 7 #include "src/heap/incremental-marking.h"
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 do { 180 do {
181 VisitPointersWithAnchor(heap, HeapObject::RawField(object, 0), 181 VisitPointersWithAnchor(heap, HeapObject::RawField(object, 0),
182 HeapObject::RawField(object, start_offset), 182 HeapObject::RawField(object, start_offset),
183 HeapObject::RawField(object, end_offset)); 183 HeapObject::RawField(object, end_offset));
184 start_offset = end_offset; 184 start_offset = end_offset;
185 end_offset = Min(object_size, end_offset + kProgressBarScanningChunk); 185 end_offset = Min(object_size, end_offset + kProgressBarScanningChunk);
186 scan_until_end = 186 scan_until_end =
187 heap->mark_compact_collector()->marking_deque()->IsFull(); 187 heap->mark_compact_collector()->marking_deque()->IsFull();
188 } while (scan_until_end && start_offset < object_size); 188 } while (scan_until_end && start_offset < object_size);
189 chunk->set_progress_bar(start_offset); 189 chunk->set_progress_bar(start_offset);
190 if (start_offset < object_size) { 190 if (start_offset < object_size) {
Hannes Payer (out of office) 2015/05/15 15:26:06 As discussed offline, let's figure out the reason
191 heap->mark_compact_collector()->marking_deque()->UnshiftGrey(object); 191 if (Marking::IsGrey(Marking::MarkBitFrom(object))) {
192 heap->mark_compact_collector()->marking_deque()->UnshiftGrey(object);
193 } else {
194 DCHECK(Marking::IsBlack(Marking::MarkBitFrom(object)));
195 heap->mark_compact_collector()->marking_deque()->UnshiftBlack(object);
196 }
192 heap->incremental_marking()->NotifyIncompleteScanOfObject( 197 heap->incremental_marking()->NotifyIncompleteScanOfObject(
193 object_size - (start_offset - already_scanned_offset)); 198 object_size - (start_offset - already_scanned_offset));
194 } 199 }
195 } else { 200 } else {
196 FixedArrayVisitor::Visit(map, object); 201 FixedArrayVisitor::Visit(map, object);
197 } 202 }
198 } 203 }
199 204
200 static void VisitNativeContextIncremental(Map* map, HeapObject* object) { 205 static void VisitNativeContextIncremental(Map* map, HeapObject* object) {
201 Context* context = Context::cast(object); 206 Context* context = Context::cast(object);
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1033 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1029 idle_marking_delay_counter_++; 1034 idle_marking_delay_counter_++;
1030 } 1035 }
1031 1036
1032 1037
1033 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1038 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1034 idle_marking_delay_counter_ = 0; 1039 idle_marking_delay_counter_ = 0;
1035 } 1040 }
1036 } 1041 }
1037 } // namespace v8::internal 1042 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698