| OLD | NEW |
| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 marking_speed_ * | 928 marking_speed_ * |
| 929 Max(allocated_, write_barriers_invoked_since_last_step_); | 929 Max(allocated_, write_barriers_invoked_since_last_step_); |
| 930 allocated_ = 0; | 930 allocated_ = 0; |
| 931 write_barriers_invoked_since_last_step_ = 0; | 931 write_barriers_invoked_since_last_step_ = 0; |
| 932 | 932 |
| 933 bytes_scanned_ += bytes_to_process; | 933 bytes_scanned_ += bytes_to_process; |
| 934 | 934 |
| 935 if (state_ == SWEEPING) { | 935 if (state_ == SWEEPING) { |
| 936 if (heap_->mark_compact_collector()->sweeping_in_progress() && | 936 if (heap_->mark_compact_collector()->sweeping_in_progress() && |
| 937 (heap_->mark_compact_collector()->IsSweepingCompleted() || | 937 (heap_->mark_compact_collector()->IsSweepingCompleted() || |
| 938 !FLAG_concurrent_sweeping)) { | 938 !heap_->concurrent_sweeping_enabled())) { |
| 939 heap_->mark_compact_collector()->EnsureSweepingCompleted(); | 939 heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
| 940 } | 940 } |
| 941 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { | 941 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { |
| 942 bytes_scanned_ = 0; | 942 bytes_scanned_ = 0; |
| 943 StartMarking(PREVENT_COMPACTION); | 943 StartMarking(PREVENT_COMPACTION); |
| 944 } | 944 } |
| 945 } else if (state_ == MARKING) { | 945 } else if (state_ == MARKING) { |
| 946 bytes_processed = ProcessMarkingDeque(bytes_to_process); | 946 bytes_processed = ProcessMarkingDeque(bytes_to_process); |
| 947 if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) { | 947 if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) { |
| 948 if (completion == FORCE_COMPLETION || | 948 if (completion == FORCE_COMPLETION || |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1003 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1004 idle_marking_delay_counter_++; | 1004 idle_marking_delay_counter_++; |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 | 1007 |
| 1008 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1008 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1009 idle_marking_delay_counter_ = 0; | 1009 idle_marking_delay_counter_ = 0; |
| 1010 } | 1010 } |
| 1011 } | 1011 } |
| 1012 } // namespace v8::internal | 1012 } // namespace v8::internal |
| OLD | NEW |