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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 | 860 |
861 // Performs incremental marking steps of step_size_in_bytes as long as | 861 // Performs incremental marking steps of step_size_in_bytes as long as |
862 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute | 862 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute |
863 // an estimate increment. Returns the remaining time that cannot be used | 863 // an estimate increment. Returns the remaining time that cannot be used |
864 // for incremental marking anymore because a single step would exceed the | 864 // for incremental marking anymore because a single step would exceed the |
865 // deadline. | 865 // deadline. |
866 double AdvanceIncrementalMarking( | 866 double AdvanceIncrementalMarking( |
867 intptr_t step_size_in_bytes, double deadline_in_ms, | 867 intptr_t step_size_in_bytes, double deadline_in_ms, |
868 IncrementalMarking::StepActions step_actions); | 868 IncrementalMarking::StepActions step_actions); |
869 | 869 |
| 870 bool TryFinalizeIdleIncrementalMarking(double idle_time_in_ms); |
| 871 |
870 inline void increment_scan_on_scavenge_pages() { | 872 inline void increment_scan_on_scavenge_pages() { |
871 scan_on_scavenge_pages_++; | 873 scan_on_scavenge_pages_++; |
872 if (FLAG_gc_verbose) { | 874 if (FLAG_gc_verbose) { |
873 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 875 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
874 } | 876 } |
875 } | 877 } |
876 | 878 |
877 inline void decrement_scan_on_scavenge_pages() { | 879 inline void decrement_scan_on_scavenge_pages() { |
878 scan_on_scavenge_pages_--; | 880 scan_on_scavenge_pages_--; |
879 if (FLAG_gc_verbose) { | 881 if (FLAG_gc_verbose) { |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 | 2236 |
2235 void SelectScavengingVisitorsTable(); | 2237 void SelectScavengingVisitorsTable(); |
2236 | 2238 |
2237 bool HasLowYoungGenerationAllocationRate(); | 2239 bool HasLowYoungGenerationAllocationRate(); |
2238 bool HasLowOldGenerationAllocationRate(); | 2240 bool HasLowOldGenerationAllocationRate(); |
2239 double YoungGenerationMutatorUtilization(); | 2241 double YoungGenerationMutatorUtilization(); |
2240 double OldGenerationMutatorUtilization(); | 2242 double OldGenerationMutatorUtilization(); |
2241 | 2243 |
2242 void ReduceNewSpaceSize(); | 2244 void ReduceNewSpaceSize(); |
2243 | 2245 |
2244 bool TryFinalizeIdleIncrementalMarking( | |
2245 double idle_time_in_ms, size_t size_of_objects, | |
2246 size_t mark_compact_speed_in_bytes_per_ms); | |
2247 | |
2248 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2246 GCIdleTimeHandler::HeapState ComputeHeapState(); |
2249 | 2247 |
2250 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2248 bool PerformIdleTimeAction(GCIdleTimeAction action, |
2251 GCIdleTimeHandler::HeapState heap_state, | 2249 GCIdleTimeHandler::HeapState heap_state, |
2252 double deadline_in_ms); | 2250 double deadline_in_ms); |
2253 | 2251 |
2254 void IdleNotificationEpilogue(GCIdleTimeAction action, | 2252 void IdleNotificationEpilogue(GCIdleTimeAction action, |
2255 GCIdleTimeHandler::HeapState heap_state, | 2253 GCIdleTimeHandler::HeapState heap_state, |
2256 double start_ms, double deadline_in_ms); | 2254 double start_ms, double deadline_in_ms); |
2257 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, | 2255 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2843 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2841 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2844 | 2842 |
2845 private: | 2843 private: |
2846 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2844 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2847 }; | 2845 }; |
2848 #endif // DEBUG | 2846 #endif // DEBUG |
2849 } | 2847 } |
2850 } // namespace v8::internal | 2848 } // namespace v8::internal |
2851 | 2849 |
2852 #endif // V8_HEAP_HEAP_H_ | 2850 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |