| 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-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 // so the cache can be undefined. | 925 // so the cache can be undefined. |
| 926 HeapObject* cache = HeapObject::cast( | 926 HeapObject* cache = HeapObject::cast( |
| 927 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX)); | 927 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX)); |
| 928 if (!cache->IsUndefined()) { | 928 if (!cache->IsUndefined()) { |
| 929 MarkBit mark_bit = Marking::MarkBitFrom(cache); | 929 MarkBit mark_bit = Marking::MarkBitFrom(cache); |
| 930 if (Marking::IsGrey(mark_bit)) { | 930 if (Marking::IsGrey(mark_bit)) { |
| 931 Marking::GreyToBlack(mark_bit); | 931 Marking::GreyToBlack(mark_bit); |
| 932 MemoryChunk::IncrementLiveBytesFromGC(cache, cache->Size()); | 932 MemoryChunk::IncrementLiveBytesFromGC(cache, cache->Size()); |
| 933 } | 933 } |
| 934 } | 934 } |
| 935 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 935 context = Context::cast(context)->next_context_link(); |
| 936 } | 936 } |
| 937 } | 937 } |
| 938 | 938 |
| 939 | 939 |
| 940 void IncrementalMarking::Stop() { | 940 void IncrementalMarking::Stop() { |
| 941 if (IsStopped()) return; | 941 if (IsStopped()) return; |
| 942 if (FLAG_trace_incremental_marking) { | 942 if (FLAG_trace_incremental_marking) { |
| 943 PrintF("[IncrementalMarking] Stopping.\n"); | 943 PrintF("[IncrementalMarking] Stopping.\n"); |
| 944 } | 944 } |
| 945 | 945 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1226 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1227 idle_marking_delay_counter_++; | 1227 idle_marking_delay_counter_++; |
| 1228 } | 1228 } |
| 1229 | 1229 |
| 1230 | 1230 |
| 1231 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1231 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1232 idle_marking_delay_counter_ = 0; | 1232 idle_marking_delay_counter_ = 0; |
| 1233 } | 1233 } |
| 1234 } // namespace internal | 1234 } // namespace internal |
| 1235 } // namespace v8 | 1235 } // namespace v8 |
| OLD | NEW |