| 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 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 unsigned int maximum_size_scavenges_; | 2059 unsigned int maximum_size_scavenges_; |
| 2060 | 2060 |
| 2061 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. | 2061 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. |
| 2062 // Re-visit incremental marking heuristics. | 2062 // Re-visit incremental marking heuristics. |
| 2063 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } | 2063 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } |
| 2064 | 2064 |
| 2065 void ConfigureInitialOldGenerationSize(); | 2065 void ConfigureInitialOldGenerationSize(); |
| 2066 | 2066 |
| 2067 void SelectScavengingVisitorsTable(); | 2067 void SelectScavengingVisitorsTable(); |
| 2068 | 2068 |
| 2069 void IdleMarkCompact(const char* message); | 2069 void ReduceNewSpaceSize(bool long_idle_time); |
| 2070 | 2070 |
| 2071 bool TryFinalizeIdleIncrementalMarking( | 2071 bool TryFinalizeIdleIncrementalMarking( |
| 2072 double idle_time_in_ms, size_t size_of_objects, | 2072 bool long_idle_time, double idle_time_in_ms, size_t size_of_objects, |
| 2073 size_t mark_compact_speed_in_bytes_per_ms); | 2073 size_t mark_compact_speed_in_bytes_per_ms); |
| 2074 | 2074 |
| 2075 void ClearObjectStats(bool clear_last_time_stats = false); | 2075 void ClearObjectStats(bool clear_last_time_stats = false); |
| 2076 | 2076 |
| 2077 inline void UpdateAllocationsHash(HeapObject* object); | 2077 inline void UpdateAllocationsHash(HeapObject* object); |
| 2078 inline void UpdateAllocationsHash(uint32_t value); | 2078 inline void UpdateAllocationsHash(uint32_t value); |
| 2079 inline void PrintAlloctionsHash(); | 2079 inline void PrintAlloctionsHash(); |
| 2080 | 2080 |
| 2081 // Object counts and used memory by InstanceType | 2081 // Object counts and used memory by InstanceType |
| 2082 size_t object_counts_[OBJECT_STATS_COUNT]; | 2082 size_t object_counts_[OBJECT_STATS_COUNT]; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2107 | 2107 |
| 2108 MarkCompactCollector mark_compact_collector_; | 2108 MarkCompactCollector mark_compact_collector_; |
| 2109 | 2109 |
| 2110 StoreBuffer store_buffer_; | 2110 StoreBuffer store_buffer_; |
| 2111 | 2111 |
| 2112 Marking marking_; | 2112 Marking marking_; |
| 2113 | 2113 |
| 2114 IncrementalMarking incremental_marking_; | 2114 IncrementalMarking incremental_marking_; |
| 2115 | 2115 |
| 2116 GCIdleTimeHandler gc_idle_time_handler_; | 2116 GCIdleTimeHandler gc_idle_time_handler_; |
| 2117 unsigned int gc_count_at_last_idle_gc_; | |
| 2118 | 2117 |
| 2119 // These two counters are monotomically increasing and never reset. | 2118 // These two counters are monotomically increasing and never reset. |
| 2120 size_t full_codegen_bytes_generated_; | 2119 size_t full_codegen_bytes_generated_; |
| 2121 size_t crankshaft_codegen_bytes_generated_; | 2120 size_t crankshaft_codegen_bytes_generated_; |
| 2122 | 2121 |
| 2123 // If the --deopt_every_n_garbage_collections flag is set to a positive value, | 2122 // If the --deopt_every_n_garbage_collections flag is set to a positive value, |
| 2124 // this variable holds the number of garbage collections since the last | 2123 // this variable holds the number of garbage collections since the last |
| 2125 // deoptimization triggered by garbage collection. | 2124 // deoptimization triggered by garbage collection. |
| 2126 int gcs_since_last_deopt_; | 2125 int gcs_since_last_deopt_; |
| 2127 | 2126 |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2606 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2605 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2607 | 2606 |
| 2608 private: | 2607 private: |
| 2609 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2608 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2610 }; | 2609 }; |
| 2611 #endif // DEBUG | 2610 #endif // DEBUG |
| 2612 } | 2611 } |
| 2613 } // namespace v8::internal | 2612 } // namespace v8::internal |
| 2614 | 2613 |
| 2615 #endif // V8_HEAP_HEAP_H_ | 2614 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |