Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/heap/gc-idle-time-handler.h

Issue 1272573006: When allocation rate is low and we are close to the new space limit, we should perform a scavenge d… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 // The maximum idle time when frames are rendered is 16.66ms. 118 // The maximum idle time when frames are rendered is 16.66ms.
119 static const size_t kMaxFrameRenderingIdleTime = 17; 119 static const size_t kMaxFrameRenderingIdleTime = 17;
120 120
121 static const int kMinBackgroundIdleTime = 900; 121 static const int kMinBackgroundIdleTime = 900;
122 122
123 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms 123 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms
124 // no idle notification happens. 124 // no idle notification happens.
125 static const size_t kTimeUntilNextIdleEvent = 100; 125 static const size_t kTimeUntilNextIdleEvent = 100;
126 126
127 // An allocation throughput below kLowAllocationThroughput bytes/ms is
128 // considered low
129 static const size_t kLowAllocationThroughput = 1000;
130
127 // If we haven't recorded any scavenger events yet, we use a conservative 131 // If we haven't recorded any scavenger events yet, we use a conservative
128 // lower bound for the scavenger speed. 132 // lower bound for the scavenger speed.
129 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; 133 static const size_t kInitialConservativeScavengeSpeed = 100 * KB;
130 134
131 // The minimum size of allocated new space objects to trigger a scavenge. 135 // The minimum size of allocated new space objects to trigger a scavenge.
132 static const size_t kMinimumNewSpaceSizeToPerformScavenge = MB / 2; 136 static const size_t kMinimumNewSpaceSizeToPerformScavenge = MB / 2;
133 137
134 // If contexts are disposed at a higher rate a full gc is triggered. 138 // If contexts are disposed at a higher rate a full gc is triggered.
135 static const double kHighContextDisposalRate; 139 static const double kHighContextDisposalRate;
136 140
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // Idle notifications with no progress. 207 // Idle notifications with no progress.
204 int idle_times_which_made_no_progress_; 208 int idle_times_which_made_no_progress_;
205 209
206 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); 210 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler);
207 }; 211 };
208 212
209 } // namespace internal 213 } // namespace internal
210 } // namespace v8 214 } // namespace v8
211 215
212 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ 216 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698