| 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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
| 6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 | 1288 |
| 1289 inline void DoScavengeObject(Map* map, HeapObject** slot, HeapObject* obj) { | 1289 inline void DoScavengeObject(Map* map, HeapObject** slot, HeapObject* obj) { |
| 1290 scavenging_visitors_table_.GetVisitor(map)(map, slot, obj); | 1290 scavenging_visitors_table_.GetVisitor(map)(map, slot, obj); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 void QueueMemoryChunkForFree(MemoryChunk* chunk); | 1293 void QueueMemoryChunkForFree(MemoryChunk* chunk); |
| 1294 void FreeQueuedChunks(); | 1294 void FreeQueuedChunks(); |
| 1295 | 1295 |
| 1296 int gc_count() const { return gc_count_; } | 1296 int gc_count() const { return gc_count_; } |
| 1297 | 1297 |
| 1298 bool RecentIdleNotifcationHappened(); |
| 1299 |
| 1298 // Completely clear the Instanceof cache (to stop it keeping objects alive | 1300 // Completely clear the Instanceof cache (to stop it keeping objects alive |
| 1299 // around a GC). | 1301 // around a GC). |
| 1300 inline void CompletelyClearInstanceofCache(); | 1302 inline void CompletelyClearInstanceofCache(); |
| 1301 | 1303 |
| 1302 // The roots that have an index less than this are always in old space. | 1304 // The roots that have an index less than this are always in old space. |
| 1303 static const int kOldSpaceRoots = 0x20; | 1305 static const int kOldSpaceRoots = 0x20; |
| 1304 | 1306 |
| 1305 uint32_t HashSeed() { | 1307 uint32_t HashSeed() { |
| 1306 uint32_t seed = static_cast<uint32_t>(hash_seed()->value()); | 1308 uint32_t seed = static_cast<uint32_t>(hash_seed()->value()); |
| 1307 DCHECK(FLAG_randomize_hashes || seed == 0); | 1309 DCHECK(FLAG_randomize_hashes || seed == 0); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 | 2052 |
| 2051 // Minimal interval between two subsequent collections. | 2053 // Minimal interval between two subsequent collections. |
| 2052 double min_in_mutator_; | 2054 double min_in_mutator_; |
| 2053 | 2055 |
| 2054 // Cumulative GC time spent in marking | 2056 // Cumulative GC time spent in marking |
| 2055 double marking_time_; | 2057 double marking_time_; |
| 2056 | 2058 |
| 2057 // Cumulative GC time spent in sweeping | 2059 // Cumulative GC time spent in sweeping |
| 2058 double sweeping_time_; | 2060 double sweeping_time_; |
| 2059 | 2061 |
| 2062 // Last time an idle notification happened |
| 2063 double last_idle_notification_time_; |
| 2064 |
| 2060 MarkCompactCollector mark_compact_collector_; | 2065 MarkCompactCollector mark_compact_collector_; |
| 2061 | 2066 |
| 2062 StoreBuffer store_buffer_; | 2067 StoreBuffer store_buffer_; |
| 2063 | 2068 |
| 2064 Marking marking_; | 2069 Marking marking_; |
| 2065 | 2070 |
| 2066 IncrementalMarking incremental_marking_; | 2071 IncrementalMarking incremental_marking_; |
| 2067 | 2072 |
| 2068 GCIdleTimeHandler gc_idle_time_handler_; | 2073 GCIdleTimeHandler gc_idle_time_handler_; |
| 2069 unsigned int gc_count_at_last_idle_gc_; | 2074 unsigned int gc_count_at_last_idle_gc_; |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2579 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2584 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2580 | 2585 |
| 2581 private: | 2586 private: |
| 2582 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2587 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2583 }; | 2588 }; |
| 2584 #endif // DEBUG | 2589 #endif // DEBUG |
| 2585 } | 2590 } |
| 2586 } // namespace v8::internal | 2591 } // namespace v8::internal |
| 2587 | 2592 |
| 2588 #endif // V8_HEAP_HEAP_H_ | 2593 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |