| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_GC_IDLE_TIME_HANDLER_H_ | 5 #ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| 6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| 7 | 7 |
| 8 #include "src/globals.h" | 8 #include "src/globals.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 enum GCIdleTimeActionType { | 13 enum GCIdleTimeActionType { |
| 14 DONE, |
| 14 DO_NOTHING, | 15 DO_NOTHING, |
| 15 DO_INCREMENTAL_MARKING, | 16 DO_INCREMENTAL_MARKING, |
| 16 DO_SCAVENGE, | 17 DO_SCAVENGE, |
| 17 DO_FULL_GC, | 18 DO_FULL_GC, |
| 18 DO_FINALIZE_SWEEPING | 19 DO_FINALIZE_SWEEPING |
| 19 }; | 20 }; |
| 20 | 21 |
| 21 | 22 |
| 22 class GCIdleTimeAction { | 23 class GCIdleTimeAction { |
| 23 public: | 24 public: |
| 25 static GCIdleTimeAction Done() { |
| 26 GCIdleTimeAction result; |
| 27 result.type = DONE; |
| 28 result.parameter = 0; |
| 29 return result; |
| 30 } |
| 31 |
| 24 static GCIdleTimeAction Nothing() { | 32 static GCIdleTimeAction Nothing() { |
| 25 GCIdleTimeAction result; | 33 GCIdleTimeAction result; |
| 26 result.type = DO_NOTHING; | 34 result.type = DO_NOTHING; |
| 27 result.parameter = 0; | 35 result.parameter = 0; |
| 28 return result; | 36 return result; |
| 29 } | 37 } |
| 30 | 38 |
| 31 static GCIdleTimeAction IncrementalMarking(intptr_t step_size) { | 39 static GCIdleTimeAction IncrementalMarking(intptr_t step_size) { |
| 32 GCIdleTimeAction result; | 40 GCIdleTimeAction result; |
| 33 result.type = DO_INCREMENTAL_MARKING; | 41 result.type = DO_INCREMENTAL_MARKING; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 int mark_compacts_since_idle_round_started_; | 157 int mark_compacts_since_idle_round_started_; |
| 150 int scavenges_since_last_idle_round_; | 158 int scavenges_since_last_idle_round_; |
| 151 | 159 |
| 152 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 160 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 153 }; | 161 }; |
| 154 | 162 |
| 155 } // namespace internal | 163 } // namespace internal |
| 156 } // namespace v8 | 164 } // namespace v8 |
| 157 | 165 |
| 158 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 166 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |