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/mark-compact-inl.h" | 10 #include "src/heap/mark-compact-inl.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 IncrementalMarkingMarkingVisitor::Initialize(); | 290 IncrementalMarkingMarkingVisitor::Initialize(); |
291 } | 291 } |
292 | 292 |
293 | 293 |
294 void IncrementalMarking::SetOldSpacePageFlags(MemoryChunk* chunk, | 294 void IncrementalMarking::SetOldSpacePageFlags(MemoryChunk* chunk, |
295 bool is_marking, | 295 bool is_marking, |
296 bool is_compacting) { | 296 bool is_compacting) { |
297 if (is_marking) { | 297 if (is_marking) { |
298 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 298 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
299 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 299 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
300 | |
301 // It's difficult to filter out slots recorded for large objects. | |
302 if (chunk->owner()->identity() == LO_SPACE && | |
303 chunk->size() > static_cast<size_t>(Page::kPageSize) && is_compacting) { | |
304 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); | |
305 } | |
306 } else { | 300 } else { |
307 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 301 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
308 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 302 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
309 } | 303 } |
310 } | 304 } |
311 | 305 |
312 | 306 |
313 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk, | 307 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk, |
314 bool is_marking) { | 308 bool is_marking) { |
315 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 309 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1015 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1022 idle_marking_delay_counter_++; | 1016 idle_marking_delay_counter_++; |
1023 } | 1017 } |
1024 | 1018 |
1025 | 1019 |
1026 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1020 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1027 idle_marking_delay_counter_ = 0; | 1021 idle_marking_delay_counter_ = 0; |
1028 } | 1022 } |
1029 } // namespace internal | 1023 } // namespace internal |
1030 } // namespace v8 | 1024 } // namespace v8 |
OLD | NEW |