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

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

Issue 726363002: Fix concurrent sweeping in predictable mode and bring --concurrent-sweeping flag back. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « src/flag-definitions.h ('k') | src/heap/mark-compact.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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap/incremental-marking.h" 7 #include "src/heap/incremental-marking.h"
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 intptr_t bytes_to_process = 929 intptr_t bytes_to_process =
930 marking_speed_ * 930 marking_speed_ *
931 Max(allocated_, write_barriers_invoked_since_last_step_); 931 Max(allocated_, write_barriers_invoked_since_last_step_);
932 allocated_ = 0; 932 allocated_ = 0;
933 write_barriers_invoked_since_last_step_ = 0; 933 write_barriers_invoked_since_last_step_ = 0;
934 934
935 bytes_scanned_ += bytes_to_process; 935 bytes_scanned_ += bytes_to_process;
936 936
937 if (state_ == SWEEPING) { 937 if (state_ == SWEEPING) {
938 if (heap_->mark_compact_collector()->sweeping_in_progress() && 938 if (heap_->mark_compact_collector()->sweeping_in_progress() &&
939 heap_->mark_compact_collector()->IsSweepingCompleted()) { 939 (heap_->mark_compact_collector()->IsSweepingCompleted() ||
940 !FLAG_concurrent_sweeping)) {
940 heap_->mark_compact_collector()->EnsureSweepingCompleted(); 941 heap_->mark_compact_collector()->EnsureSweepingCompleted();
941 } 942 }
942 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { 943 if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
943 bytes_scanned_ = 0; 944 bytes_scanned_ = 0;
944 StartMarking(PREVENT_COMPACTION); 945 StartMarking(PREVENT_COMPACTION);
945 } 946 }
946 } else if (state_ == MARKING) { 947 } else if (state_ == MARKING) {
947 bytes_processed = ProcessMarkingDeque(bytes_to_process); 948 bytes_processed = ProcessMarkingDeque(bytes_to_process);
948 if (marking_deque_.IsEmpty()) { 949 if (marking_deque_.IsEmpty()) {
949 if (completion == FORCE_COMPLETION || 950 if (completion == FORCE_COMPLETION ||
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 999 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
999 idle_marking_delay_counter_++; 1000 idle_marking_delay_counter_++;
1000 } 1001 }
1001 1002
1002 1003
1003 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1004 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1004 idle_marking_delay_counter_ = 0; 1005 idle_marking_delay_counter_ = 0;
1005 } 1006 }
1006 } 1007 }
1007 } // namespace v8::internal 1008 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698