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 | |
870 inline void increment_scan_on_scavenge_pages() { | 855 inline void increment_scan_on_scavenge_pages() { |
871 scan_on_scavenge_pages_++; | 856 scan_on_scavenge_pages_++; |
872 if (FLAG_gc_verbose) { | 857 if (FLAG_gc_verbose) { |
873 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 858 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
874 } | 859 } |
875 } | 860 } |
876 | 861 |
877 inline void decrement_scan_on_scavenge_pages() { | 862 inline void decrement_scan_on_scavenge_pages() { |
878 scan_on_scavenge_pages_--; | 863 scan_on_scavenge_pages_--; |
879 if (FLAG_gc_verbose) { | 864 if (FLAG_gc_verbose) { |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 double OldGenerationMutatorUtilization(); | 2225 double OldGenerationMutatorUtilization(); |
2241 | 2226 |
2242 void ReduceNewSpaceSize(); | 2227 void ReduceNewSpaceSize(); |
2243 | 2228 |
2244 bool TryFinalizeIdleIncrementalMarking( | 2229 bool TryFinalizeIdleIncrementalMarking( |
2245 double idle_time_in_ms, size_t size_of_objects, | 2230 double idle_time_in_ms, size_t size_of_objects, |
2246 size_t mark_compact_speed_in_bytes_per_ms); | 2231 size_t mark_compact_speed_in_bytes_per_ms); |
2247 | 2232 |
2248 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2233 GCIdleTimeHandler::HeapState ComputeHeapState(); |
2249 | 2234 |
| 2235 double AdvanceIncrementalMarking( |
| 2236 intptr_t step_size_in_bytes, double deadline_in_ms, |
| 2237 IncrementalMarking::ForceCompletionAction completion); |
| 2238 |
2250 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2239 bool PerformIdleTimeAction(GCIdleTimeAction action, |
2251 GCIdleTimeHandler::HeapState heap_state, | 2240 GCIdleTimeHandler::HeapState heap_state, |
2252 double deadline_in_ms); | 2241 double deadline_in_ms); |
2253 | 2242 |
2254 void IdleNotificationEpilogue(GCIdleTimeAction action, | 2243 void IdleNotificationEpilogue(GCIdleTimeAction action, |
2255 GCIdleTimeHandler::HeapState heap_state, | 2244 GCIdleTimeHandler::HeapState heap_state, |
2256 double start_ms, double deadline_in_ms); | 2245 double start_ms, double deadline_in_ms); |
2257 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, | 2246 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, |
2258 double now_ms); | 2247 double now_ms); |
2259 | 2248 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2843 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2832 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2844 | 2833 |
2845 private: | 2834 private: |
2846 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2835 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2847 }; | 2836 }; |
2848 #endif // DEBUG | 2837 #endif // DEBUG |
2849 } | 2838 } |
2850 } // namespace v8::internal | 2839 } // namespace v8::internal |
2851 | 2840 |
2852 #endif // V8_HEAP_HEAP_H_ | 2841 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |