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/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/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 } | 72 } |
73 } | 73 } |
74 if (!is_compacting_) return false; | 74 if (!is_compacting_) return false; |
75 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 75 MarkBit obj_bit = Marking::MarkBitFrom(obj); |
76 return Marking::IsBlack(obj_bit); | 76 return Marking::IsBlack(obj_bit); |
77 } | 77 } |
78 | 78 |
79 | 79 |
80 void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot, | 80 void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot, |
81 Object* value) { | 81 Object* value) { |
82 if (BaseRecordWrite(obj, slot, value) && slot != NULL) { | 82 if (BaseRecordWrite(obj, slot, value) && slot != NULL) { |
Hannes Payer (out of office)
2015/11/03 22:51:14
BaseRecordWrite already tells us if we have to rec
Michael Lippautz
2015/11/03 22:54:25
Acknowledged.
| |
83 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 83 // Object is not going to be rescanned we need to record the slot. |
84 if (Marking::IsBlack(obj_bit)) { | 84 heap_->mark_compact_collector()->RecordSlot(obj, slot, value); |
85 // Object is not going to be rescanned we need to record the slot. | |
86 heap_->mark_compact_collector()->RecordSlot(obj, slot, value); | |
87 } | |
88 } | 85 } |
89 } | 86 } |
90 | 87 |
91 | 88 |
92 void IncrementalMarking::RecordWriteFromCode(HeapObject* obj, Object** slot, | 89 void IncrementalMarking::RecordWriteFromCode(HeapObject* obj, Object** slot, |
93 Isolate* isolate) { | 90 Isolate* isolate) { |
94 DCHECK(obj->IsHeapObject()); | 91 DCHECK(obj->IsHeapObject()); |
95 IncrementalMarking* marking = isolate->heap()->incremental_marking(); | 92 IncrementalMarking* marking = isolate->heap()->incremental_marking(); |
96 | 93 |
97 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | 94 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1154 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1151 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1155 idle_marking_delay_counter_++; | 1152 idle_marking_delay_counter_++; |
1156 } | 1153 } |
1157 | 1154 |
1158 | 1155 |
1159 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1156 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1160 idle_marking_delay_counter_ = 0; | 1157 idle_marking_delay_counter_ = 0; |
1161 } | 1158 } |
1162 } // namespace internal | 1159 } // namespace internal |
1163 } // namespace v8 | 1160 } // namespace v8 |
OLD | NEW |