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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 // Check whether the heap is currently iterable. | 845 // Check whether the heap is currently iterable. |
846 bool IsHeapIterable(); | 846 bool IsHeapIterable(); |
847 | 847 |
848 // Notify the heap that a context has been disposed. | 848 // Notify the heap that a context has been disposed. |
849 int NotifyContextDisposed(bool dependant_context); | 849 int NotifyContextDisposed(bool dependant_context); |
850 | 850 |
851 // Start incremental marking and ensure that idle time handler can perform | 851 // Start incremental marking and ensure that idle time handler can perform |
852 // incremental steps. | 852 // incremental steps. |
853 void StartIdleIncrementalMarking(); | 853 void StartIdleIncrementalMarking(); |
854 | 854 |
| 855 // Starts incremental marking assuming incremental marking is currently |
| 856 // stopped. |
| 857 void StartIncrementalMarking(int gc_flags, |
| 858 const GCCallbackFlags gc_callback_flags, |
| 859 const char* reason = nullptr); |
| 860 |
| 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 |
| 863 // an estimate increment. Returns the remaining time that cannot be used |
| 864 // for incremental marking anymore because a single step would exceed the |
| 865 // deadline. |
| 866 double AdvanceIncrementalMarking( |
| 867 intptr_t step_size_in_bytes, double deadline_in_ms, |
| 868 IncrementalMarking::StepActions step_actions); |
| 869 |
855 inline void increment_scan_on_scavenge_pages() { | 870 inline void increment_scan_on_scavenge_pages() { |
856 scan_on_scavenge_pages_++; | 871 scan_on_scavenge_pages_++; |
857 if (FLAG_gc_verbose) { | 872 if (FLAG_gc_verbose) { |
858 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 873 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
859 } | 874 } |
860 } | 875 } |
861 | 876 |
862 inline void decrement_scan_on_scavenge_pages() { | 877 inline void decrement_scan_on_scavenge_pages() { |
863 scan_on_scavenge_pages_--; | 878 scan_on_scavenge_pages_--; |
864 if (FLAG_gc_verbose) { | 879 if (FLAG_gc_verbose) { |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 double OldGenerationMutatorUtilization(); | 2240 double OldGenerationMutatorUtilization(); |
2226 | 2241 |
2227 void ReduceNewSpaceSize(); | 2242 void ReduceNewSpaceSize(); |
2228 | 2243 |
2229 bool TryFinalizeIdleIncrementalMarking( | 2244 bool TryFinalizeIdleIncrementalMarking( |
2230 double idle_time_in_ms, size_t size_of_objects, | 2245 double idle_time_in_ms, size_t size_of_objects, |
2231 size_t mark_compact_speed_in_bytes_per_ms); | 2246 size_t mark_compact_speed_in_bytes_per_ms); |
2232 | 2247 |
2233 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2248 GCIdleTimeHandler::HeapState ComputeHeapState(); |
2234 | 2249 |
2235 double AdvanceIncrementalMarking( | |
2236 intptr_t step_size_in_bytes, double deadline_in_ms, | |
2237 IncrementalMarking::ForceCompletionAction completion); | |
2238 | |
2239 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2250 bool PerformIdleTimeAction(GCIdleTimeAction action, |
2240 GCIdleTimeHandler::HeapState heap_state, | 2251 GCIdleTimeHandler::HeapState heap_state, |
2241 double deadline_in_ms); | 2252 double deadline_in_ms); |
2242 | 2253 |
2243 void IdleNotificationEpilogue(GCIdleTimeAction action, | 2254 void IdleNotificationEpilogue(GCIdleTimeAction action, |
2244 GCIdleTimeHandler::HeapState heap_state, | 2255 GCIdleTimeHandler::HeapState heap_state, |
2245 double start_ms, double deadline_in_ms); | 2256 double start_ms, double deadline_in_ms); |
2246 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, | 2257 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, |
2247 double now_ms); | 2258 double now_ms); |
2248 | 2259 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2843 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2833 | 2844 |
2834 private: | 2845 private: |
2835 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2846 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2836 }; | 2847 }; |
2837 #endif // DEBUG | 2848 #endif // DEBUG |
2838 } | 2849 } |
2839 } // namespace v8::internal | 2850 } // namespace v8::internal |
2840 | 2851 |
2841 #endif // V8_HEAP_HEAP_H_ | 2852 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |