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