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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, | 124 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, |
125 Object** slot, | 125 Object** slot, |
126 Code* value) { | 126 Code* value) { |
127 if (BaseRecordWrite(host, value)) { | 127 if (BaseRecordWrite(host, value)) { |
128 DCHECK(slot != NULL); | 128 DCHECK(slot != NULL); |
129 heap_->mark_compact_collector()->RecordCodeEntrySlot( | 129 heap_->mark_compact_collector()->RecordCodeEntrySlot( |
130 host, reinterpret_cast<Address>(slot), value); | 130 host, reinterpret_cast<Address>(slot), value); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 | 134 void IncrementalMarking::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, |
135 void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj, | |
136 RelocInfo* rinfo, | |
137 Object* value) { | 135 Object* value) { |
138 if (BaseRecordWrite(obj, value)) { | 136 if (BaseRecordWrite(host, value)) { |
139 // Object is not going to be rescanned. We need to record the slot. | 137 // Object is not going to be rescanned. We need to record the slot. |
140 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, value); | 138 heap_->mark_compact_collector()->RecordRelocSlot(host, rinfo, value); |
141 } | 139 } |
142 } | 140 } |
143 | 141 |
144 | 142 |
145 void IncrementalMarking::RecordWrites(HeapObject* obj) { | 143 void IncrementalMarking::RecordWrites(HeapObject* obj) { |
146 if (IsMarking()) { | 144 if (IsMarking()) { |
147 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 145 MarkBit obj_bit = Marking::MarkBitFrom(obj); |
148 if (Marking::IsBlack(obj_bit)) { | 146 if (Marking::IsBlack(obj_bit)) { |
149 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | 147 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
150 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { | 148 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1244 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1247 idle_marking_delay_counter_++; | 1245 idle_marking_delay_counter_++; |
1248 } | 1246 } |
1249 | 1247 |
1250 | 1248 |
1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1249 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1252 idle_marking_delay_counter_ = 0; | 1250 idle_marking_delay_counter_ = 0; |
1253 } | 1251 } |
1254 } // namespace internal | 1252 } // namespace internal |
1255 } // namespace v8 | 1253 } // namespace v8 |
OLD | NEW |