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/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-tracer.h" | 10 #include "src/heap/gc-tracer.h" |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 } | 894 } |
895 } | 895 } |
896 } | 896 } |
897 } | 897 } |
898 | 898 |
899 | 899 |
900 intptr_t IncrementalMarking::Step(intptr_t allocated_bytes, | 900 intptr_t IncrementalMarking::Step(intptr_t allocated_bytes, |
901 CompletionAction action, | 901 CompletionAction action, |
902 ForceMarkingAction marking, | 902 ForceMarkingAction marking, |
903 ForceCompletionAction completion) { | 903 ForceCompletionAction completion) { |
904 // Temporarily removed for crbug.com/536163 | 904 DCHECK(allocated_bytes >= 0); |
905 // DCHECK(allocated_bytes >= 0); | |
906 | 905 |
907 if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking || | 906 if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking || |
908 (state_ != SWEEPING && state_ != MARKING)) { | 907 (state_ != SWEEPING && state_ != MARKING)) { |
909 return 0; | 908 return 0; |
910 } | 909 } |
911 | 910 |
912 allocated_ += allocated_bytes; | 911 allocated_ += allocated_bytes; |
913 | 912 |
914 if (marking == DO_NOT_FORCE_MARKING && allocated_ < kAllocatedThreshold && | 913 if (marking == DO_NOT_FORCE_MARKING && allocated_ < kAllocatedThreshold && |
915 write_barriers_invoked_since_last_step_ < | 914 write_barriers_invoked_since_last_step_ < |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1016 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1018 idle_marking_delay_counter_++; | 1017 idle_marking_delay_counter_++; |
1019 } | 1018 } |
1020 | 1019 |
1021 | 1020 |
1022 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1021 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1023 idle_marking_delay_counter_ = 0; | 1022 idle_marking_delay_counter_ = 0; |
1024 } | 1023 } |
1025 } // namespace internal | 1024 } // namespace internal |
1026 } // namespace v8 | 1025 } // namespace v8 |
OLD | NEW |