| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 // for this is that we have a lot of allocation sequences and we | 957 // for this is that we have a lot of allocation sequences and we |
| 958 // assume that a garbage collection will allow the subsequent | 958 // assume that a garbage collection will allow the subsequent |
| 959 // allocation attempts to go through. | 959 // allocation attempts to go through. |
| 960 allocation_timeout_ = Max(6, FLAG_gc_interval); | 960 allocation_timeout_ = Max(6, FLAG_gc_interval); |
| 961 #endif | 961 #endif |
| 962 | 962 |
| 963 EnsureFillerObjectAtTop(); | 963 EnsureFillerObjectAtTop(); |
| 964 | 964 |
| 965 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { | 965 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { |
| 966 if (FLAG_trace_incremental_marking) { | 966 if (FLAG_trace_incremental_marking) { |
| 967 PrintF("[IncrementalMarking] Scavenge during marking.\n"); | 967 isolate()->PrintWithTimestamp( |
| 968 "[IncrementalMarking] Scavenge during marking.\n"); |
| 968 } | 969 } |
| 969 } | 970 } |
| 970 | 971 |
| 971 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() && | 972 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() && |
| 972 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() && | 973 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() && |
| 973 !incremental_marking()->should_hurry() && FLAG_incremental_marking && | 974 !incremental_marking()->should_hurry() && FLAG_incremental_marking && |
| 974 OldGenerationAllocationLimitReached()) { | 975 OldGenerationAllocationLimitReached()) { |
| 975 if (!incremental_marking()->IsComplete() && | 976 if (!incremental_marking()->IsComplete() && |
| 976 !mark_compact_collector()->marking_deque_.IsEmpty() && | 977 !mark_compact_collector()->marking_deque_.IsEmpty() && |
| 977 !FLAG_gc_global) { | 978 !FLAG_gc_global) { |
| 978 if (FLAG_trace_incremental_marking) { | 979 if (FLAG_trace_incremental_marking) { |
| 979 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); | 980 isolate()->PrintWithTimestamp( |
| 981 "[IncrementalMarking] Delaying MarkSweep.\n"); |
| 980 } | 982 } |
| 981 collector = SCAVENGER; | 983 collector = SCAVENGER; |
| 982 collector_reason = "incremental marking delaying mark-sweep"; | 984 collector_reason = "incremental marking delaying mark-sweep"; |
| 983 } | 985 } |
| 984 } | 986 } |
| 985 | 987 |
| 986 bool next_gc_likely_to_collect_more = false; | 988 bool next_gc_likely_to_collect_more = false; |
| 987 intptr_t committed_memory_before = 0; | 989 intptr_t committed_memory_before = 0; |
| 988 | 990 |
| 989 if (collector == MARK_COMPACTOR) { | 991 if (collector == MARK_COMPACTOR) { |
| (...skipping 5511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6501 } | 6503 } |
| 6502 | 6504 |
| 6503 | 6505 |
| 6504 // static | 6506 // static |
| 6505 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6507 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6506 return StaticVisitorBase::GetVisitorId(map); | 6508 return StaticVisitorBase::GetVisitorId(map); |
| 6507 } | 6509 } |
| 6508 | 6510 |
| 6509 } // namespace internal | 6511 } // namespace internal |
| 6510 } // namespace v8 | 6512 } // namespace v8 |
| OLD | NEW |