Chromium Code Reviews| 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 void StartIncrementalMarking(int gc_flags, | |
|
Hannes Payer (out of office)
2015/08/04 15:05:59
Add comments to these functions.
Michael Lippautz
2015/08/04 15:53:06
Done.
| |
| 856 const GCCallbackFlags gc_callback_flags, | |
| 857 const char* reason = nullptr); | |
| 858 | |
| 859 double AdvanceIncrementalMarking( | |
| 860 intptr_t step_size_in_bytes, double deadline_in_ms, | |
| 861 IncrementalMarking::StepActions step_actions); | |
| 862 | |
| 855 inline void increment_scan_on_scavenge_pages() { | 863 inline void increment_scan_on_scavenge_pages() { |
| 856 scan_on_scavenge_pages_++; | 864 scan_on_scavenge_pages_++; |
| 857 if (FLAG_gc_verbose) { | 865 if (FLAG_gc_verbose) { |
| 858 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 866 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
| 859 } | 867 } |
| 860 } | 868 } |
| 861 | 869 |
| 862 inline void decrement_scan_on_scavenge_pages() { | 870 inline void decrement_scan_on_scavenge_pages() { |
| 863 scan_on_scavenge_pages_--; | 871 scan_on_scavenge_pages_--; |
| 864 if (FLAG_gc_verbose) { | 872 if (FLAG_gc_verbose) { |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2225 double OldGenerationMutatorUtilization(); | 2233 double OldGenerationMutatorUtilization(); |
| 2226 | 2234 |
| 2227 void ReduceNewSpaceSize(); | 2235 void ReduceNewSpaceSize(); |
| 2228 | 2236 |
| 2229 bool TryFinalizeIdleIncrementalMarking( | 2237 bool TryFinalizeIdleIncrementalMarking( |
| 2230 double idle_time_in_ms, size_t size_of_objects, | 2238 double idle_time_in_ms, size_t size_of_objects, |
| 2231 size_t mark_compact_speed_in_bytes_per_ms); | 2239 size_t mark_compact_speed_in_bytes_per_ms); |
| 2232 | 2240 |
| 2233 GCIdleTimeHandler::HeapState ComputeHeapState(); | 2241 GCIdleTimeHandler::HeapState ComputeHeapState(); |
| 2234 | 2242 |
| 2235 double AdvanceIncrementalMarking( | |
| 2236 intptr_t step_size_in_bytes, double deadline_in_ms, | |
| 2237 IncrementalMarking::ForceCompletionAction completion); | |
| 2238 | |
| 2239 bool PerformIdleTimeAction(GCIdleTimeAction action, | 2243 bool PerformIdleTimeAction(GCIdleTimeAction action, |
| 2240 GCIdleTimeHandler::HeapState heap_state, | 2244 GCIdleTimeHandler::HeapState heap_state, |
| 2241 double deadline_in_ms); | 2245 double deadline_in_ms); |
| 2242 | 2246 |
| 2243 void IdleNotificationEpilogue(GCIdleTimeAction action, | 2247 void IdleNotificationEpilogue(GCIdleTimeAction action, |
| 2244 GCIdleTimeHandler::HeapState heap_state, | 2248 GCIdleTimeHandler::HeapState heap_state, |
| 2245 double start_ms, double deadline_in_ms); | 2249 double start_ms, double deadline_in_ms); |
| 2246 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, | 2250 void CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, |
| 2247 double now_ms); | 2251 double now_ms); |
| 2248 | 2252 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2832 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2836 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2833 | 2837 |
| 2834 private: | 2838 private: |
| 2835 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2839 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2836 }; | 2840 }; |
| 2837 #endif // DEBUG | 2841 #endif // DEBUG |
| 2838 } | 2842 } |
| 2839 } // namespace v8::internal | 2843 } // namespace v8::internal |
| 2840 | 2844 |
| 2841 #endif // V8_HEAP_HEAP_H_ | 2845 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |