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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 class IncrementalMarkingMarkingVisitor | 208 class IncrementalMarkingMarkingVisitor |
209 : public StaticMarkingVisitor<IncrementalMarkingMarkingVisitor> { | 209 : public StaticMarkingVisitor<IncrementalMarkingMarkingVisitor> { |
210 public: | 210 public: |
211 static void Initialize() { | 211 static void Initialize() { |
212 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize(); | 212 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize(); |
213 table_.Register(kVisitFixedArray, &VisitFixedArrayIncremental); | 213 table_.Register(kVisitFixedArray, &VisitFixedArrayIncremental); |
214 table_.Register(kVisitNativeContext, &VisitNativeContextIncremental); | 214 table_.Register(kVisitNativeContext, &VisitNativeContextIncremental); |
215 table_.Register(kVisitJSRegExp, &VisitJSRegExp); | 215 table_.Register(kVisitJSRegExp, &VisitJSRegExp); |
216 if (FLAG_track_gc_object_stats) { | |
217 IncrementalMarkingObjectStatsVisitor::Initialize(&table_); | |
218 } | |
219 } | 216 } |
220 | 217 |
221 static const int kProgressBarScanningChunk = 32 * 1024; | 218 static const int kProgressBarScanningChunk = 32 * 1024; |
222 | 219 |
223 static void VisitFixedArrayIncremental(Map* map, HeapObject* object) { | 220 static void VisitFixedArrayIncremental(Map* map, HeapObject* object) { |
224 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); | 221 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
225 // TODO(mstarzinger): Move setting of the flag to the allocation site of | 222 // TODO(mstarzinger): Move setting of the flag to the allocation site of |
226 // the array. The visitor should just check the flag. | 223 // the array. The visitor should just check the flag. |
227 if (FLAG_use_marking_progress_bar && | 224 if (FLAG_use_marking_progress_bar && |
228 chunk->owner()->identity() == LO_SPACE) { | 225 chunk->owner()->identity() == LO_SPACE) { |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1278 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1282 idle_marking_delay_counter_++; | 1279 idle_marking_delay_counter_++; |
1283 } | 1280 } |
1284 | 1281 |
1285 | 1282 |
1286 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1283 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1287 idle_marking_delay_counter_ = 0; | 1284 idle_marking_delay_counter_ = 0; |
1288 } | 1285 } |
1289 } // namespace internal | 1286 } // namespace internal |
1290 } // namespace v8 | 1287 } // namespace v8 |
OLD | NEW |