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

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

Issue 1277943003: Version 4.4.63.30 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.4
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 | « include/v8-version.h ('k') | src/heap/heap.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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 size_t idle_time_in_ms, size_t size_of_objects, 224 size_t idle_time_in_ms, size_t size_of_objects,
225 size_t final_incremental_mark_compact_speed_in_bytes_per_ms); 225 size_t final_incremental_mark_compact_speed_in_bytes_per_ms);
226 226
227 static bool ShouldDoOverApproximateWeakClosure(size_t idle_time_in_ms); 227 static bool ShouldDoOverApproximateWeakClosure(size_t idle_time_in_ms);
228 228
229 static bool ShouldDoScavenge( 229 static bool ShouldDoScavenge(
230 size_t idle_time_in_ms, size_t new_space_size, size_t used_new_space_size, 230 size_t idle_time_in_ms, size_t new_space_size, size_t used_new_space_size,
231 size_t scavenger_speed_in_bytes_per_ms, 231 size_t scavenger_speed_in_bytes_per_ms,
232 size_t new_space_allocation_throughput_in_bytes_per_ms); 232 size_t new_space_allocation_throughput_in_bytes_per_ms);
233 233
234 bool ShouldGrowHeapSlowly() {
235 return mode() == kDone;
236 }
237
234 enum Mode { kReduceLatency, kReduceMemory, kDone }; 238 enum Mode { kReduceLatency, kReduceMemory, kDone };
235 239
236 Mode mode() { return mode_; } 240 Mode mode() { return mode_; }
237 241
238 private: 242 private:
239 bool IsMutatorActive(int contexts_disposed, int gcs); 243 bool IsMutatorActive(int contexts_disposed, int gcs);
240 bool IsMutatorIdle(int long_idle_notifications, 244 bool IsMutatorIdle(int long_idle_notifications,
241 int background_idle_notifications, int gcs); 245 int background_idle_notifications, int gcs);
242 void UpdateCounters(double idle_time_in_ms); 246 void UpdateCounters(double idle_time_in_ms);
243 void ResetCounters(); 247 void ResetCounters();
(...skipping 16 matching lines...) Expand all
260 264
261 Mode mode_; 265 Mode mode_;
262 266
263 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); 267 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler);
264 }; 268 };
265 269
266 } // namespace internal 270 } // namespace internal
267 } // namespace v8 271 } // namespace v8
268 272
269 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ 273 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698