Lines Matching refs: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.
653 // Ready to start incremental marking.
693 MarkBit mark_bit = Marking::MarkBitFrom(obj);
694 ASSERT(Marking::IsGrey(mark_bit) ||
695 (obj->IsFiller() && Marking::IsWhite(mark_bit)));
705 MarkBit mark_bit = Marking::MarkBitFrom(obj);
707 ASSERT(Marking::IsGrey(mark_bit) ||
708 (obj->IsFiller() && Marking::IsWhite(mark_bit)) ||
710 Marking::IsBlack(mark_bit)));
723 MarkBit map_mark_bit = Marking::MarkBitFrom(map);
724 if (Marking::IsWhite(map_mark_bit)) {
730 MarkBit mark_bit = Marking::MarkBitFrom(obj);
733 SLOW_ASSERT(Marking::IsGrey(mark_bit) ||
734 (obj->IsFiller() && Marking::IsWhite(mark_bit)) ||
736 Marking::IsBlack(mark_bit)));
776 if (state() == MARKING) {
801 Marking::GreyToBlack(Marking::MarkBitFrom(poly_cache));
813 MarkBit mark_bit = Marking::MarkBitFrom(cache);
814 if (Marking::IsGrey(mark_bit)) {
815 Marking::GreyToBlack(mark_bit);
901 (state_ != SWEEPING && state_ != MARKING)) {
913 if (state_ == MARKING && no_marking_scope_depth_ > 0) return;
915 // The marking speed is driven either by the allocation rate or by the rate
918 // barriers before we get here and check them (marking can only take place on
940 } else if (state_ == MARKING) {
952 PrintPID("Speed up marking after %d steps\n",
967 if (FLAG_trace_gc) PrintPID("Speed up marking because of low space left\n");
978 PrintPID("Speed up marking because of heap size increase\n");
990 PrintPID("Speed up marking because marker was not keeping up\n");
996 if (state_ != MARKING) {
998 PrintPID("Postponing speeding up marking until marking starts\n");
1006 PrintPID("Marking speed increased to %d\n", marking_speed_);