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/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
10 #include "src/ast/context-slot-cache.h" | 10 #include "src/ast/context-slot-cache.h" |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 int remaining_in_page = static_cast<int>(page->area_end() - to_top); | 971 int remaining_in_page = static_cast<int>(page->area_end() - to_top); |
972 CreateFillerObjectAt(to_top, remaining_in_page, ClearRecordedSlots::kNo); | 972 CreateFillerObjectAt(to_top, remaining_in_page, ClearRecordedSlots::kNo); |
973 } | 973 } |
974 } | 974 } |
975 | 975 |
976 bool Heap::CollectGarbage(GarbageCollector collector, | 976 bool Heap::CollectGarbage(GarbageCollector collector, |
977 GarbageCollectionReason gc_reason, | 977 GarbageCollectionReason gc_reason, |
978 const char* collector_reason, | 978 const char* collector_reason, |
979 const v8::GCCallbackFlags gc_callback_flags) { | 979 const v8::GCCallbackFlags gc_callback_flags) { |
980 // The VM is in the GC state until exiting this function. | 980 // The VM is in the GC state until exiting this function. |
981 VMState<GC> state(isolate_); | 981 VMState<GC> state(isolate()); |
982 RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC); | 982 RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC); |
983 | 983 |
984 #ifdef DEBUG | 984 #ifdef DEBUG |
985 // Reset the allocation timeout to the GC interval, but make sure to | 985 // Reset the allocation timeout to the GC interval, but make sure to |
986 // allow at least a few allocations after a collection. The reason | 986 // allow at least a few allocations after a collection. The reason |
987 // for this is that we have a lot of allocation sequences and we | 987 // for this is that we have a lot of allocation sequences and we |
988 // assume that a garbage collection will allow the subsequent | 988 // assume that a garbage collection will allow the subsequent |
989 // allocation attempts to go through. | 989 // allocation attempts to go through. |
990 allocation_timeout_ = Max(6, FLAG_gc_interval); | 990 allocation_timeout_ = Max(6, FLAG_gc_interval); |
991 #endif | 991 #endif |
(...skipping 5387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6379 case LO_SPACE: | 6379 case LO_SPACE: |
6380 return "LO_SPACE"; | 6380 return "LO_SPACE"; |
6381 default: | 6381 default: |
6382 UNREACHABLE(); | 6382 UNREACHABLE(); |
6383 } | 6383 } |
6384 return NULL; | 6384 return NULL; |
6385 } | 6385 } |
6386 | 6386 |
6387 } // namespace internal | 6387 } // namespace internal |
6388 } // namespace v8 | 6388 } // namespace v8 |
OLD | NEW |