| 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/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { | 976 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { |
| 977 if (FLAG_trace_incremental_marking) { | 977 if (FLAG_trace_incremental_marking) { |
| 978 PrintF("[IncrementalMarking] Scavenge during marking.\n"); | 978 PrintF("[IncrementalMarking] Scavenge during marking.\n"); |
| 979 } | 979 } |
| 980 } | 980 } |
| 981 | 981 |
| 982 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() && | 982 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() && |
| 983 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() && | 983 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() && |
| 984 !incremental_marking()->should_hurry() && FLAG_incremental_marking && | 984 !incremental_marking()->should_hurry() && FLAG_incremental_marking && |
| 985 OldGenerationAllocationLimitReached()) { | 985 OldGenerationAllocationLimitReached()) { |
| 986 // Make progress in incremental marking. | |
| 987 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; | |
| 988 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, | |
| 989 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | |
| 990 if (!incremental_marking()->IsComplete() && | 986 if (!incremental_marking()->IsComplete() && |
| 991 !mark_compact_collector()->marking_deque_.IsEmpty() && | 987 !mark_compact_collector()->marking_deque_.IsEmpty() && |
| 992 !FLAG_gc_global) { | 988 !FLAG_gc_global) { |
| 993 if (FLAG_trace_incremental_marking) { | 989 if (FLAG_trace_incremental_marking) { |
| 994 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); | 990 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
| 995 } | 991 } |
| 996 collector = SCAVENGER; | 992 collector = SCAVENGER; |
| 997 collector_reason = "incremental marking delaying mark-sweep"; | 993 collector_reason = "incremental marking delaying mark-sweep"; |
| 998 } | 994 } |
| 999 } | 995 } |
| (...skipping 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6447 } | 6443 } |
| 6448 | 6444 |
| 6449 | 6445 |
| 6450 // static | 6446 // static |
| 6451 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6447 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6452 return StaticVisitorBase::GetVisitorId(map); | 6448 return StaticVisitorBase::GetVisitorId(map); |
| 6453 } | 6449 } |
| 6454 | 6450 |
| 6455 } // namespace internal | 6451 } // namespace internal |
| 6456 } // namespace v8 | 6452 } // namespace v8 |
| OLD | NEW |