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/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 | 975 |
976 EnsureFillerObjectAtTop(); | 976 EnsureFillerObjectAtTop(); |
977 | 977 |
978 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { | 978 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { |
979 if (FLAG_trace_incremental_marking) { | 979 if (FLAG_trace_incremental_marking) { |
980 isolate()->PrintWithTimestamp( | 980 isolate()->PrintWithTimestamp( |
981 "[IncrementalMarking] Scavenge during marking.\n"); | 981 "[IncrementalMarking] Scavenge during marking.\n"); |
982 } | 982 } |
983 } | 983 } |
984 | 984 |
| 985 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() && |
| 986 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() && |
| 987 !incremental_marking()->should_hurry() && FLAG_incremental_marking && |
| 988 OldGenerationAllocationLimitReached()) { |
| 989 if (!incremental_marking()->IsComplete() && |
| 990 !mark_compact_collector()->marking_deque_.IsEmpty() && |
| 991 !FLAG_gc_global) { |
| 992 if (FLAG_trace_incremental_marking) { |
| 993 isolate()->PrintWithTimestamp( |
| 994 "[IncrementalMarking] Delaying MarkSweep.\n"); |
| 995 } |
| 996 collector = SCAVENGER; |
| 997 collector_reason = "incremental marking delaying mark-sweep"; |
| 998 } |
| 999 } |
| 1000 |
985 bool next_gc_likely_to_collect_more = false; | 1001 bool next_gc_likely_to_collect_more = false; |
986 intptr_t committed_memory_before = 0; | 1002 intptr_t committed_memory_before = 0; |
987 | 1003 |
988 if (collector == MARK_COMPACTOR) { | 1004 if (collector == MARK_COMPACTOR) { |
989 committed_memory_before = CommittedOldGenerationMemory(); | 1005 committed_memory_before = CommittedOldGenerationMemory(); |
990 } | 1006 } |
991 | 1007 |
992 { | 1008 { |
993 tracer()->Start(collector, gc_reason, collector_reason); | 1009 tracer()->Start(collector, gc_reason, collector_reason); |
994 DCHECK(AllowHeapAllocation::IsAllowed()); | 1010 DCHECK(AllowHeapAllocation::IsAllowed()); |
(...skipping 5519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6514 } | 6530 } |
6515 | 6531 |
6516 | 6532 |
6517 // static | 6533 // static |
6518 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6534 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6519 return StaticVisitorBase::GetVisitorId(map); | 6535 return StaticVisitorBase::GetVisitorId(map); |
6520 } | 6536 } |
6521 | 6537 |
6522 } // namespace internal | 6538 } // namespace internal |
6523 } // namespace v8 | 6539 } // namespace v8 |
OLD | NEW |