Lines Matching full:marking
30 #include "incremental-marking.h"
71 MarkBit obj_bit = Marking::MarkBitFrom(obj);
72 if (Marking::IsBlack(obj_bit)) {
85 IncrementalMarking* marking = isolate->heap()->incremental_marking();
86 ASSERT(!marking->is_compacting_);
91 marking->write_barriers_invoked_since_last_step_ +=
98 marking->RecordWrite(obj, slot, *slot);
106 IncrementalMarking* marking = isolate->heap()->incremental_marking();
107 ASSERT(marking->is_compacting_);
112 marking->write_barriers_invoked_since_last_step_ +=
119 marking->RecordWrite(obj, slot, *slot);
157 MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value));
158 if (Marking::IsWhite(value_bit)) {
159 MarkBit obj_bit = Marking::MarkBitFrom(obj);
160 if (Marking::IsBlack(obj_bit)) {
169 MarkBit obj_bit = Marking::MarkBitFrom(obj);
170 if (Marking::IsBlack(obj_bit)) {
182 MarkBit mark_bit = Marking::MarkBitFrom(HeapObject::cast(obj));
183 if (Marking::IsBlack(mark_bit)) {
187 Marking::AnyToGrey(mark_bit);
195 ASSERT(!Marking::IsImpossible(mark_bit));
199 ASSERT(Marking::IsBlack(mark_bit));
206 ASSERT(!Marking::IsImpossible(mark_bit));
207 if (Marking::IsBlack(mark_bit)) return;
208 Marking::MarkBlack(mark_bit);
210 ASSERT(Marking::IsBlack(mark_bit));
237 // the array and try to push it onto the marking deque again until it is
271 // when we finish marking.
317 // Marks the object grey and pushes it on the marking stack.
320 MarkBit mark_bit = Marking::MarkBitFrom(heap_object);
323 } else if (Marking::IsWhite(mark_bit)) {
328 // Marks the object black without pushing it on the marking stack.
329 // Returns true if object needed marking and false otherwise.
332 MarkBit mark_bit = Marking::MarkBitFrom(heap_object);
333 if (Marking::IsWhite(mark_bit)) {
365 MarkBit mark_bit = Marking::MarkBitFrom(heap_object);
369 if (Marking::IsWhite(mark_bit)) {
498 // debug tests run with incremental marking and some without.
501 // Only start incremental marking in a safe state: 1) when expose GC is
502 // deactivated, 2) when incremental marking is turned on, 3) when we are
521 // we don't need to do anything if incremental marking is
607 PrintF("[IncrementalMarking] Start marking\n");
614 state_ = MARKING;
623 // Initialize marking stack.
631 // Marking bits are cleared by the sweeper.
643 // when we finish marking.
651 // Ready to start incremental marking.
691 MarkBit mark_bit = Marking::MarkBitFrom(obj);
692 ASSERT(Marking::IsGrey(mark_bit) ||
693 (obj->IsFiller() && Marking::IsWhite(mark_bit)));
703 MarkBit mark_bit = Marking::MarkBitFrom(obj);
705 ASSERT(Marking::IsGrey(mark_bit) ||
706 (obj->IsFiller() && Marking::IsWhite(mark_bit)) ||
708 Marking::IsBlack(mark_bit)));
721 MarkBit map_mark_bit = Marking::MarkBitFrom(map);
722 if (Marking::IsWhite(map_mark_bit)) {
728 MarkBit mark_bit = Marking::MarkBitFrom(obj);
731 SLOW_ASSERT(Marking::IsGrey(mark_bit) ||
732 (obj->IsFiller() && Marking::IsWhite(mark_bit)) ||
734 Marking::IsBlack(mark_bit)));
774 if (state() == MARKING) {
799 Marking::GreyToBlack(Marking::MarkBitFrom(poly_cache));
811 MarkBit mark_bit = Marking::MarkBitFrom(cache);
812 if (Marking::IsGrey(mark_bit)) {
813 Marking::GreyToBlack(mark_bit);
899 (state_ != SWEEPING && state_ != MARKING)) {
911 if (state_ == MARKING && no_marking_scope_depth_ > 0) return;
913 // The marking speed is driven either by the allocation rate or by the rate
916 // barriers before we get here and check them (marking can only take place on
938 } else if (state_ == MARKING) {
950 PrintPID("Speed up marking after %d steps\n",
965 if (FLAG_trace_gc) PrintPID("Speed up marking because of low space left\n");
976 PrintPID("Speed up marking because of heap size increase\n");
988 PrintPID("Speed up marking because marker was not keeping up\n");
994 if (state_ != MARKING) {
996 PrintPID("Postponing speeding up marking until marking starts\n");
1004 PrintPID("Marking speed increased to %d\n", marking_speed_);