| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 // so the cache can be undefined. | 935 // so the cache can be undefined. |
| 936 HeapObject* cache = HeapObject::cast( | 936 HeapObject* cache = HeapObject::cast( |
| 937 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX)); | 937 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX)); |
| 938 if (!cache->IsUndefined()) { | 938 if (!cache->IsUndefined()) { |
| 939 MarkBit mark_bit = Marking::MarkBitFrom(cache); | 939 MarkBit mark_bit = Marking::MarkBitFrom(cache); |
| 940 if (Marking::IsGrey(mark_bit)) { | 940 if (Marking::IsGrey(mark_bit)) { |
| 941 Marking::GreyToBlack(mark_bit); | 941 Marking::GreyToBlack(mark_bit); |
| 942 MemoryChunk::IncrementLiveBytesFromGC(cache, cache->Size()); | 942 MemoryChunk::IncrementLiveBytesFromGC(cache, cache->Size()); |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 945 context = Context::cast(context)->next_context_link(); |
| 946 } | 946 } |
| 947 } | 947 } |
| 948 | 948 |
| 949 | 949 |
| 950 void IncrementalMarking::Stop() { | 950 void IncrementalMarking::Stop() { |
| 951 if (IsStopped()) return; | 951 if (IsStopped()) return; |
| 952 if (FLAG_trace_incremental_marking) { | 952 if (FLAG_trace_incremental_marking) { |
| 953 PrintF("[IncrementalMarking] Stopping.\n"); | 953 PrintF("[IncrementalMarking] Stopping.\n"); |
| 954 } | 954 } |
| 955 | 955 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1245 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1246 idle_marking_delay_counter_++; | 1246 idle_marking_delay_counter_++; |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 | 1249 |
| 1250 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1250 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1251 idle_marking_delay_counter_ = 0; | 1251 idle_marking_delay_counter_ = 0; |
| 1252 } | 1252 } |
| 1253 } // namespace internal | 1253 } // namespace internal |
| 1254 } // namespace v8 | 1254 } // namespace v8 |
| OLD | NEW |