Chromium Code Reviews

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

Issue 576093002: Only do incremental marking in idle notification when incremental marking was already started or wh… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« 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/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 125 matching lines...)
136 if (!heap_state.can_start_incremental_marking) { 136 if (!heap_state.can_start_incremental_marking) {
137 return GCIdleTimeAction::Nothing(); 137 return GCIdleTimeAction::Nothing();
138 } 138 }
139 } 139 }
140 // TODO(hpayer): Estimate finalize sweeping time. 140 // TODO(hpayer): Estimate finalize sweeping time.
141 if (heap_state.sweeping_in_progress && 141 if (heap_state.sweeping_in_progress &&
142 idle_time_in_ms >= kMinTimeForFinalizeSweeping) { 142 idle_time_in_ms >= kMinTimeForFinalizeSweeping) {
143 return GCIdleTimeAction::FinalizeSweeping(); 143 return GCIdleTimeAction::FinalizeSweeping();
144 } 144 }
145 145
146 if (heap_state.incremental_marking_stopped && 146 if (heap_state.incremental_marking_stopped ||
147 !heap_state.can_start_incremental_marking) { 147 !heap_state.can_start_incremental_marking) {
148 return GCIdleTimeAction::Nothing(); 148 return GCIdleTimeAction::Nothing();
149 } 149 }
150 size_t step_size = EstimateMarkingStepSize( 150 size_t step_size = EstimateMarkingStepSize(
151 idle_time_in_ms, heap_state.incremental_marking_speed_in_bytes_per_ms); 151 idle_time_in_ms, heap_state.incremental_marking_speed_in_bytes_per_ms);
152 return GCIdleTimeAction::IncrementalMarking(step_size); 152 return GCIdleTimeAction::IncrementalMarking(step_size);
153 } 153 }
154 } 154 }
155 } 155 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine