OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| 6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| 7 |
| 8 namespace v8 { |
| 9 namespace internal { |
| 10 |
| 11 // The idle time handler makes decisions about which garbage collection |
| 12 // operations are executing during IdleNotification. |
| 13 class GCIdleTimeHandler BASE_EMBEDDED { |
| 14 public: |
| 15 static intptr_t EstimateMarkingStepSize( |
| 16 int idle_time_in_ms, intptr_t marking_speed_in_bytes_per_millisecond); |
| 17 |
| 18 // If we haven't recorded any incremental marking events yet, we carefully |
| 19 // mark with a conservative lower bound for the marking speed. |
| 20 static const intptr_t kInitialConservativeMarkingSpeed = 100 * KB; |
| 21 |
| 22 // We have to make sure that we finish the IdleNotification before |
| 23 // idle_time_in_ms. Hence, we conservatively prune our workload estimate. |
| 24 static const double kConservativeTimeRatio; |
| 25 |
| 26 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 28 }; |
| 29 } |
| 30 } // namespace v8::internal |
| 31 |
| 32 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |