| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  151   // The number of mutator GCs before transitioning to the kReduceLatency mode. |  151   // The number of mutator GCs before transitioning to the kReduceLatency mode. | 
|  152   static const int kGCsBeforeMutatorIsActive = 7; |  152   static const int kGCsBeforeMutatorIsActive = 7; | 
|  153  |  153  | 
|  154   // Mutator is considered idle if |  154   // Mutator is considered idle if | 
|  155   // 1) there is an idle notification with time >= kLargeLongIdleTime, |  155   // 1) there is an idle notification with time >= kLargeLongIdleTime, | 
|  156   // 2) or there are kLongIdleNotificationsBeforeMutatorIsIdle idle |  156   // 2) or there are kLongIdleNotificationsBeforeMutatorIsIdle idle | 
|  157   // notifications |  157   // notifications | 
|  158   //    with time >= kMinLongIdleTime and without any mutator GC in between. |  158   //    with time >= kMinLongIdleTime and without any mutator GC in between. | 
|  159   static const int kMinLongIdleTime = kMaxFrameRenderingIdleTime + 1; |  159   static const int kMinLongIdleTime = kMaxFrameRenderingIdleTime + 1; | 
|  160   static const int kLargeLongIdleTime = 900; |  160   static const int kLargeLongIdleTime = 900; | 
|  161   static const int kLongIdleNotificationsBeforeMutatorIsIdle = 20; |  161   static const int kLongIdleNotificationsBeforeMutatorIsIdle = 600; | 
|  162  |  162  | 
|  163  |  163  | 
|  164   class HeapState { |  164   class HeapState { | 
|  165    public: |  165    public: | 
|  166     void Print(); |  166     void Print(); | 
|  167  |  167  | 
|  168     int contexts_disposed; |  168     int contexts_disposed; | 
|  169     double contexts_disposal_rate; |  169     double contexts_disposal_rate; | 
|  170     size_t size_of_objects; |  170     size_t size_of_objects; | 
|  171     bool incremental_marking_stopped; |  171     bool incremental_marking_stopped; | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  245  |  245  | 
|  246   Mode mode_; |  246   Mode mode_; | 
|  247  |  247  | 
|  248   DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |  248   DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 
|  249 }; |  249 }; | 
|  250  |  250  | 
|  251 }  // namespace internal |  251 }  // namespace internal | 
|  252 }  // namespace v8 |  252 }  // namespace v8 | 
|  253  |  253  | 
|  254 #endif  // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |  254 #endif  // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 
| OLD | NEW |