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

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

Issue 1145103002: Take freed handles into account when scheduling idle GCs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
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 #include "src/heap/gc-idle-time-handler.h" 5 #include "src/heap/gc-idle-time-handler.h"
6 #include "src/heap/gc-tracer.h" 6 #include "src/heap/gc-tracer.h"
7 #include "src/utils.h" 7 #include "src/utils.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 return kReduceLatency; 392 return kReduceLatency;
393 } 393 }
394 break; 394 break;
395 case kReduceLatency: 395 case kReduceLatency:
396 if (IsMutatorIdle(long_idle_notifications_, 396 if (IsMutatorIdle(long_idle_notifications_,
397 background_idle_notifications_, mutator_gcs)) { 397 background_idle_notifications_, mutator_gcs)) {
398 return kReduceMemory; 398 return kReduceMemory;
399 } 399 }
400 break; 400 break;
401 case kReduceMemory: 401 case kReduceMemory:
402 if (idle_mark_compacts_ >= kMaxIdleMarkCompacts) { 402 if (idle_mark_compacts_ >= kMaxIdleMarkCompacts ||
403 (idle_mark_compacts_ > 0 && !next_gc_likely_to_collect_more_)) {
403 return kDone; 404 return kDone;
404 } 405 }
405 if (mutator_gcs > idle_mark_compacts_) { 406 if (mutator_gcs > idle_mark_compacts_) {
406 return kReduceLatency; 407 return kReduceLatency;
407 } 408 }
408 break; 409 break;
409 } 410 }
410 return mode_; 411 return mode_;
411 } 412 }
412 } 413 }
413 } 414 }
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698