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