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 { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 int contexts_disposed; | 62 int contexts_disposed; |
63 double contexts_disposal_rate; | 63 double contexts_disposal_rate; |
64 size_t size_of_objects; | 64 size_t size_of_objects; |
65 bool incremental_marking_stopped; | 65 bool incremental_marking_stopped; |
66 }; | 66 }; |
67 | 67 |
68 | 68 |
69 // The idle time handler makes decisions about which garbage collection | 69 // The idle time handler makes decisions about which garbage collection |
70 // operations are executing during IdleNotification. | 70 // operations are executing during IdleNotification. |
71 class GCIdleTimeHandler { | 71 class V8_EXPORT_PRIVATE GCIdleTimeHandler { |
72 public: | 72 public: |
73 // If we haven't recorded any incremental marking events yet, we carefully | 73 // If we haven't recorded any incremental marking events yet, we carefully |
74 // mark with a conservative lower bound for the marking speed. | 74 // mark with a conservative lower bound for the marking speed. |
75 static const size_t kInitialConservativeMarkingSpeed = 100 * KB; | 75 static const size_t kInitialConservativeMarkingSpeed = 100 * KB; |
76 | 76 |
77 // Maximum marking step size returned by EstimateMarkingStepSize. | 77 // Maximum marking step size returned by EstimateMarkingStepSize. |
78 static const size_t kMaximumMarkingStepSize = 700 * MB; | 78 static const size_t kMaximumMarkingStepSize = 700 * MB; |
79 | 79 |
80 // We have to make sure that we finish the IdleNotification before | 80 // We have to make sure that we finish the IdleNotification before |
81 // idle_time_in_ms. Hence, we conservatively prune our workload estimate. | 81 // idle_time_in_ms. Hence, we conservatively prune our workload estimate. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // Idle notifications with no progress. | 148 // Idle notifications with no progress. |
149 int idle_times_which_made_no_progress_; | 149 int idle_times_which_made_no_progress_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 151 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace internal | 154 } // namespace internal |
155 } // namespace v8 | 155 } // namespace v8 |
156 | 156 |
157 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 157 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |