| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/spaces.h" | 5 #include "src/heap/spaces.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 3023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3034 } | 3034 } |
| 3035 return NULL; | 3035 return NULL; |
| 3036 } | 3036 } |
| 3037 | 3037 |
| 3038 | 3038 |
| 3039 void LargeObjectSpace::ClearMarkingStateOfLiveObjects() { | 3039 void LargeObjectSpace::ClearMarkingStateOfLiveObjects() { |
| 3040 LargePage* current = first_page_; | 3040 LargePage* current = first_page_; |
| 3041 while (current != NULL) { | 3041 while (current != NULL) { |
| 3042 HeapObject* object = current->GetObject(); | 3042 HeapObject* object = current->GetObject(); |
| 3043 DCHECK(ObjectMarking::IsBlack(object)); | 3043 DCHECK(ObjectMarking::IsBlack(object)); |
| 3044 ObjectMarking::BlackToWhite(object); | 3044 ObjectMarking::ClearMarkBit(object); |
| 3045 Page::FromAddress(object->address())->ResetProgressBar(); | 3045 Page::FromAddress(object->address())->ResetProgressBar(); |
| 3046 Page::FromAddress(object->address())->ResetLiveBytes(); | 3046 Page::FromAddress(object->address())->ResetLiveBytes(); |
| 3047 current = current->next_page(); | 3047 current = current->next_page(); |
| 3048 } | 3048 } |
| 3049 } | 3049 } |
| 3050 | 3050 |
| 3051 void LargeObjectSpace::InsertChunkMapEntries(LargePage* page) { | 3051 void LargeObjectSpace::InsertChunkMapEntries(LargePage* page) { |
| 3052 // Register all MemoryChunk::kAlignment-aligned chunks covered by | 3052 // Register all MemoryChunk::kAlignment-aligned chunks covered by |
| 3053 // this large page in the chunk map. | 3053 // this large page in the chunk map. |
| 3054 uintptr_t start = reinterpret_cast<uintptr_t>(page) / MemoryChunk::kAlignment; | 3054 uintptr_t start = reinterpret_cast<uintptr_t>(page) / MemoryChunk::kAlignment; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3230 object->ShortPrint(); | 3230 object->ShortPrint(); |
| 3231 PrintF("\n"); | 3231 PrintF("\n"); |
| 3232 } | 3232 } |
| 3233 printf(" --------------------------------------\n"); | 3233 printf(" --------------------------------------\n"); |
| 3234 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3234 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3235 } | 3235 } |
| 3236 | 3236 |
| 3237 #endif // DEBUG | 3237 #endif // DEBUG |
| 3238 } // namespace internal | 3238 } // namespace internal |
| 3239 } // namespace v8 | 3239 } // namespace v8 |
| OLD | NEW |