| 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 // Check whether the heap is currently iterable. | 830 // Check whether the heap is currently iterable. |
| 831 bool IsHeapIterable(); | 831 bool IsHeapIterable(); |
| 832 | 832 |
| 833 // Notify the heap that a context has been disposed. | 833 // Notify the heap that a context has been disposed. |
| 834 int NotifyContextDisposed(bool dependant_context); | 834 int NotifyContextDisposed(bool dependant_context); |
| 835 | 835 |
| 836 // Start incremental marking and ensure that idle time handler can perform | 836 // Start incremental marking and ensure that idle time handler can perform |
| 837 // incremental steps. | 837 // incremental steps. |
| 838 void StartIdleIncrementalMarking(); | 838 void StartIdleIncrementalMarking(); |
| 839 | 839 |
| 840 // Starts incremental marking assuming incremental marking is currently |
| 841 // stopped. |
| 842 void StartIncrementalMarking(int gc_flags, |
| 843 const GCCallbackFlags gc_callback_flags, |
| 844 const char* reason = nullptr); |
| 845 |
| 846 // Performs incremental marking steps of step_size_in_bytes as long as |
| 847 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute |
| 848 // an estimate increment. Returns the remaining time that cannot be used |
| 849 // for incremental marking anymore because a single step would exceed the |
| 850 // deadline. |
| 851 double AdvanceIncrementalMarking( |
| 852 intptr_t step_size_in_bytes, double deadline_in_ms, |
| 853 IncrementalMarking::StepActions step_actions); |
| 854 |
| 840 inline void increment_scan_on_scavenge_pages() { | 855 inline void increment_scan_on_scavenge_pages() { |
| 841 scan_on_scavenge_pages_++; | 856 scan_on_scavenge_pages_++; |
| 842 if (FLAG_gc_verbose) { | 857 if (FLAG_gc_verbose) { |
| 843 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 858 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
| 844 } | 859 } |
| 845 } | 860 } |
| 846 | 861 |
| 847 inline void decrement_scan_on_scavenge_pages() { | 862 inline void decrement_scan_on_scavenge_pages() { |
| 848 scan_on_scavenge_pages_--; | 863 scan_on_scavenge_pages_--; |
| 849 if (FLAG_gc_verbose) { | 864 if (FLAG_gc_verbose) { |
| (...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } | 2275 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } |
| 2261 | 2276 |
| 2262 void ConfigureInitialOldGenerationSize(); | 2277 void ConfigureInitialOldGenerationSize(); |
| 2263 | 2278 |
| 2264 void ConfigureNewGenerationSize(); | 2279 void ConfigureNewGenerationSize(); |
| 2265 | 2280 |
| 2266 void SelectScavengingVisitorsTable(); | 2281 void SelectScavengingVisitorsTable(); |
| 2267 | 2282 |
| 2268 bool HasLowYoungGenerationAllocationRate(); | 2283 bool HasLowYoungGenerationAllocationRate(); |
| 2269 bool HasLowOldGenerationAllocationRate(); | 2284 bool HasLowOldGenerationAllocationRate(); |
| 2285 double YoungGenerationMutatorUtilization(); |
| 2286 double OldGenerationMutatorUtilization(); |
| 2270 | 2287 |
| 2271 void ReduceNewSpaceSize(); | 2288 void ReduceNewSpaceSize(); |
| 2272 | 2289 |
| 2273 bool TryFinalizeIdleIncrementalMarking( | 2290 bool TryFinalizeIdleIncrementalMarking( |
| 2274 double idle_time_in_ms, size_t size_of_objects, | 2291 double idle_time_in_ms, size_t size_of_objects, |
| 2275 size_t mark_compact_speed_in_bytes_per_ms); | 2292 size_t mark_compact_speed_in_bytes_per_ms); |
| 2276 | 2293 |
| 2277 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2294 GCIdleTimeHandler::HeapState ComputeHeapState(); |
| 2278 | 2295 |
| 2279 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2296 bool PerformIdleTimeAction(GCIdleTimeAction action, |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2871 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2888 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2872 | 2889 |
| 2873 private: | 2890 private: |
| 2874 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2891 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2875 }; | 2892 }; |
| 2876 #endif // DEBUG | 2893 #endif // DEBUG |
| 2877 } | 2894 } |
| 2878 } // namespace v8::internal | 2895 } // namespace v8::internal |
| 2879 | 2896 |
| 2880 #endif // V8_HEAP_HEAP_H_ | 2897 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |