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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 | 170 |
171 class IncrementalMarkingMarkingVisitor | 171 class IncrementalMarkingMarkingVisitor |
172 : public StaticMarkingVisitor<IncrementalMarkingMarkingVisitor> { | 172 : public StaticMarkingVisitor<IncrementalMarkingMarkingVisitor> { |
173 public: | 173 public: |
174 static void Initialize() { | 174 static void Initialize() { |
175 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize(); | 175 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize(); |
176 table_.Register(kVisitFixedArray, &VisitFixedArrayIncremental); | 176 table_.Register(kVisitFixedArray, &VisitFixedArrayIncremental); |
177 table_.Register(kVisitNativeContext, &VisitNativeContextIncremental); | 177 table_.Register(kVisitNativeContext, &VisitNativeContextIncremental); |
178 table_.Register(kVisitJSRegExp, &VisitJSRegExp); | 178 table_.Register(kVisitJSRegExp, &VisitJSRegExp); |
179 if (FLAG_track_gc_object_stats) { | |
180 IncrementalMarkingObjectStatsVisitor::Initialize(&table_); | |
181 } | |
182 } | 179 } |
183 | 180 |
184 static const int kProgressBarScanningChunk = 32 * 1024; | 181 static const int kProgressBarScanningChunk = 32 * 1024; |
185 | 182 |
186 static void VisitFixedArrayIncremental(Map* map, HeapObject* object) { | 183 static void VisitFixedArrayIncremental(Map* map, HeapObject* object) { |
187 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); | 184 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
188 // TODO(mstarzinger): Move setting of the flag to the allocation site of | 185 // TODO(mstarzinger): Move setting of the flag to the allocation site of |
189 // the array. The visitor should just check the flag. | 186 // the array. The visitor should just check the flag. |
190 if (FLAG_use_marking_progress_bar && | 187 if (FLAG_use_marking_progress_bar && |
191 chunk->owner()->identity() == LO_SPACE) { | 188 chunk->owner()->identity() == LO_SPACE) { |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1239 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1243 idle_marking_delay_counter_++; | 1240 idle_marking_delay_counter_++; |
1244 } | 1241 } |
1245 | 1242 |
1246 | 1243 |
1247 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1244 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1248 idle_marking_delay_counter_ = 0; | 1245 idle_marking_delay_counter_ = 0; |
1249 } | 1246 } |
1250 } // namespace internal | 1247 } // namespace internal |
1251 } // namespace v8 | 1248 } // namespace v8 |
OLD | NEW |