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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 2552613004: [heap] Ensure finalization of incremental marking even if all allocations (Closed)
Patch Set: do mark-compact instead of scavenge if incremental marking needs finalization Created 4 years 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 double remaining_time_in_ms = 0.0; 1031 double remaining_time_in_ms = 0.0;
1032 intptr_t step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize( 1032 intptr_t step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize(
1033 kStepSizeInMs, 1033 kStepSizeInMs,
1034 heap()->tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); 1034 heap()->tracer()->IncrementalMarkingSpeedInBytesPerMillisecond());
1035 1035
1036 do { 1036 do {
1037 Step(step_size_in_bytes, completion_action, force_completion, step_origin); 1037 Step(step_size_in_bytes, completion_action, force_completion, step_origin);
1038 remaining_time_in_ms = 1038 remaining_time_in_ms =
1039 deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs(); 1039 deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs();
1040 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() && 1040 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() &&
1041 !heap()->mark_compact_collector()->marking_deque()->IsEmpty()); 1041 !heap()->MarkingDequesAreEmpty());
ulan 2016/12/05 21:18:16 Michael: do you approve this change?
1042 return remaining_time_in_ms; 1042 return remaining_time_in_ms;
1043 } 1043 }
1044 1044
1045 1045
1046 void IncrementalMarking::FinalizeSweeping() { 1046 void IncrementalMarking::FinalizeSweeping() {
1047 DCHECK(state_ == SWEEPING); 1047 DCHECK(state_ == SWEEPING);
1048 if (heap_->mark_compact_collector()->sweeping_in_progress() && 1048 if (heap_->mark_compact_collector()->sweeping_in_progress() &&
1049 (!FLAG_concurrent_sweeping || 1049 (!FLAG_concurrent_sweeping ||
1050 !heap_->mark_compact_collector()->sweeper().AreSweeperTasksRunning())) { 1050 !heap_->mark_compact_collector()->sweeper().AreSweeperTasksRunning())) {
1051 heap_->mark_compact_collector()->EnsureSweepingCompleted(); 1051 heap_->mark_compact_collector()->EnsureSweepingCompleted();
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 idle_marking_delay_counter_++; 1197 idle_marking_delay_counter_++;
1198 } 1198 }
1199 1199
1200 1200
1201 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1201 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1202 idle_marking_delay_counter_ = 0; 1202 idle_marking_delay_counter_ = 0;
1203 } 1203 }
1204 1204
1205 } // namespace internal 1205 } // namespace internal
1206 } // namespace v8 1206 } // namespace v8
OLDNEW
« src/heap/heap.h ('K') | « src/heap/incremental-marking.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698