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

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

Issue 1177953002: Make sure we do not start incremental marking in idle notification when incremental marking is turn… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | no next file » | 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 #include "src/flags.h"
5 #include "src/heap/gc-idle-time-handler.h" 6 #include "src/heap/gc-idle-time-handler.h"
6 #include "src/heap/gc-tracer.h" 7 #include "src/heap/gc-tracer.h"
7 #include "src/utils.h" 8 #include "src/utils.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 12
12 const double GCIdleTimeHandler::kConservativeTimeRatio = 0.9; 13 const double GCIdleTimeHandler::kConservativeTimeRatio = 0.9;
13 const size_t GCIdleTimeHandler::kMaxMarkCompactTimeInMs = 1000; 14 const size_t GCIdleTimeHandler::kMaxMarkCompactTimeInMs = 1000;
14 const size_t GCIdleTimeHandler::kMaxFinalIncrementalMarkCompactTimeInMs = 1000; 15 const size_t GCIdleTimeHandler::kMaxFinalIncrementalMarkCompactTimeInMs = 1000;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } 316 }
316 317
317 if (heap_state.sweeping_in_progress) { 318 if (heap_state.sweeping_in_progress) {
318 if (heap_state.sweeping_completed) { 319 if (heap_state.sweeping_completed) {
319 return GCIdleTimeAction::FinalizeSweeping(); 320 return GCIdleTimeAction::FinalizeSweeping();
320 } else { 321 } else {
321 return NothingOrDone(); 322 return NothingOrDone();
322 } 323 }
323 } 324 }
324 325
325 if (heap_state.incremental_marking_stopped && 326 if (!FLAG_incremental_marking ||
326 !heap_state.can_start_incremental_marking && !reduce_memory) { 327 (heap_state.incremental_marking_stopped &&
328 !heap_state.can_start_incremental_marking && !reduce_memory)) {
327 return NothingOrDone(); 329 return NothingOrDone();
328 } 330 }
329 331
330 size_t step_size = EstimateMarkingStepSize( 332 size_t step_size = EstimateMarkingStepSize(
331 static_cast<size_t>(kIncrementalMarkingStepTimeInMs), 333 static_cast<size_t>(kIncrementalMarkingStepTimeInMs),
332 heap_state.incremental_marking_speed_in_bytes_per_ms); 334 heap_state.incremental_marking_speed_in_bytes_per_ms);
333 return GCIdleTimeAction::IncrementalMarking(step_size, reduce_memory); 335 return GCIdleTimeAction::IncrementalMarking(step_size, reduce_memory);
334 } 336 }
335 337
336 338
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 408 }
407 if (mutator_gcs > idle_mark_compacts_) { 409 if (mutator_gcs > idle_mark_compacts_) {
408 return kReduceLatency; 410 return kReduceLatency;
409 } 411 }
410 break; 412 break;
411 } 413 }
412 return mode_; 414 return mode_;
413 } 415 }
414 } 416 }
415 } 417 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698