OLD | NEW |
---|---|
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/incremental-marking.h" | 7 #include "src/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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
692 HeapObject* obj = marking_deque_.Pop(); | 692 HeapObject* obj = marking_deque_.Pop(); |
693 | 693 |
694 // Explicitly skip one word fillers. Incremental markbit patterns are | 694 // Explicitly skip one word fillers. Incremental markbit patterns are |
695 // correct only for objects that occupy at least two words. | 695 // correct only for objects that occupy at least two words. |
696 Map* map = obj->map(); | 696 Map* map = obj->map(); |
697 if (map == filler_map) continue; | 697 if (map == filler_map) continue; |
698 | 698 |
699 int size = obj->SizeFromMap(map); | 699 int size = obj->SizeFromMap(map); |
700 unscanned_bytes_of_large_object_ = 0; | 700 unscanned_bytes_of_large_object_ = 0; |
701 VisitObject(map, obj, size); | 701 VisitObject(map, obj, size); |
702 bytes_to_process -= (size - unscanned_bytes_of_large_object_); | 702 int delta = (size - unscanned_bytes_of_large_object_); |
703 // FIXME: remove after http://crbug.com/381820 is resolved. | |
704 CHECK(0 < delta && delta <= bytes_to_process); | |
Hannes Payer (out of office)
2014/07/09 08:53:49
delta can be larger than bytes_to_process. I guess
| |
705 bytes_to_process -= delta; | |
703 } | 706 } |
704 } | 707 } |
705 | 708 |
706 | 709 |
707 void IncrementalMarking::ProcessMarkingDeque() { | 710 void IncrementalMarking::ProcessMarkingDeque() { |
708 Map* filler_map = heap_->one_pointer_filler_map(); | 711 Map* filler_map = heap_->one_pointer_filler_map(); |
709 while (!marking_deque_.IsEmpty()) { | 712 while (!marking_deque_.IsEmpty()) { |
710 HeapObject* obj = marking_deque_.Pop(); | 713 HeapObject* obj = marking_deque_.Pop(); |
711 | 714 |
712 // Explicitly skip one word fillers. Incremental markbit patterns are | 715 // Explicitly skip one word fillers. Incremental markbit patterns are |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 bytes_scanned_ = 0; | 989 bytes_scanned_ = 0; |
987 write_barriers_invoked_since_last_step_ = 0; | 990 write_barriers_invoked_since_last_step_ = 0; |
988 } | 991 } |
989 | 992 |
990 | 993 |
991 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 994 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
992 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 995 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
993 } | 996 } |
994 | 997 |
995 } } // namespace v8::internal | 998 } } // namespace v8::internal |
OLD | NEW |