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