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 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 | 1702 |
1703 // Record statistics before and after garbage collection. | 1703 // Record statistics before and after garbage collection. |
1704 void ReportStatisticsBeforeGC(); | 1704 void ReportStatisticsBeforeGC(); |
1705 void ReportStatisticsAfterGC(); | 1705 void ReportStatisticsAfterGC(); |
1706 | 1706 |
1707 // Creates and installs the full-sized number string cache. | 1707 // Creates and installs the full-sized number string cache. |
1708 int FullSizeNumberStringCacheLength(); | 1708 int FullSizeNumberStringCacheLength(); |
1709 // Flush the number to string cache. | 1709 // Flush the number to string cache. |
1710 void FlushNumberStringCache(); | 1710 void FlushNumberStringCache(); |
1711 | 1711 |
1712 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. | |
1713 // Re-visit incremental marking heuristics. | |
1714 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } | |
1715 | |
1716 void ConfigureInitialOldGenerationSize(); | 1712 void ConfigureInitialOldGenerationSize(); |
1717 | 1713 |
1718 bool HasLowYoungGenerationAllocationRate(); | 1714 bool HasLowYoungGenerationAllocationRate(); |
1719 bool HasLowOldGenerationAllocationRate(); | 1715 bool HasLowOldGenerationAllocationRate(); |
1720 double YoungGenerationMutatorUtilization(); | 1716 double YoungGenerationMutatorUtilization(); |
1721 double OldGenerationMutatorUtilization(); | 1717 double OldGenerationMutatorUtilization(); |
1722 | 1718 |
1723 void ReduceNewSpaceSize(); | 1719 void ReduceNewSpaceSize(); |
1724 | 1720 |
1725 GCIdleTimeHeapState ComputeHeapState(); | 1721 GCIdleTimeHeapState ComputeHeapState(); |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2189 List<GCCallbackPair> gc_epilogue_callbacks_; | 2185 List<GCCallbackPair> gc_epilogue_callbacks_; |
2190 List<GCCallbackPair> gc_prologue_callbacks_; | 2186 List<GCCallbackPair> gc_prologue_callbacks_; |
2191 | 2187 |
2192 // Total RegExp code ever generated | 2188 // Total RegExp code ever generated |
2193 double total_regexp_code_generated_; | 2189 double total_regexp_code_generated_; |
2194 | 2190 |
2195 int deferred_counters_[v8::Isolate::kUseCounterFeatureCount]; | 2191 int deferred_counters_[v8::Isolate::kUseCounterFeatureCount]; |
2196 | 2192 |
2197 GCTracer* tracer_; | 2193 GCTracer* tracer_; |
2198 | 2194 |
2199 int high_survival_rate_period_length_; | |
2200 intptr_t promoted_objects_size_; | 2195 intptr_t promoted_objects_size_; |
2201 double promotion_ratio_; | 2196 double promotion_ratio_; |
2202 double promotion_rate_; | 2197 double promotion_rate_; |
2203 intptr_t semi_space_copied_object_size_; | 2198 intptr_t semi_space_copied_object_size_; |
2204 intptr_t previous_semi_space_copied_object_size_; | 2199 intptr_t previous_semi_space_copied_object_size_; |
2205 double semi_space_copied_rate_; | 2200 double semi_space_copied_rate_; |
2206 int nodes_died_in_new_space_; | 2201 int nodes_died_in_new_space_; |
2207 int nodes_copied_in_new_space_; | 2202 int nodes_copied_in_new_space_; |
2208 int nodes_promoted_; | 2203 int nodes_promoted_; |
2209 | 2204 |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 friend class LargeObjectSpace; | 2636 friend class LargeObjectSpace; |
2642 friend class NewSpace; | 2637 friend class NewSpace; |
2643 friend class PagedSpace; | 2638 friend class PagedSpace; |
2644 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2639 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2645 }; | 2640 }; |
2646 | 2641 |
2647 } // namespace internal | 2642 } // namespace internal |
2648 } // namespace v8 | 2643 } // namespace v8 |
2649 | 2644 |
2650 #endif // V8_HEAP_HEAP_H_ | 2645 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |