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 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 PrintF("null\n"); | 2834 PrintF("null\n"); |
2835 } | 2835 } |
2836 | 2836 |
2837 | 2837 |
2838 #ifdef DEBUG | 2838 #ifdef DEBUG |
2839 size_t FreeListCategory::SumFreeList() { | 2839 size_t FreeListCategory::SumFreeList() { |
2840 size_t sum = 0; | 2840 size_t sum = 0; |
2841 FreeSpace* cur = top(); | 2841 FreeSpace* cur = top(); |
2842 while (cur != NULL) { | 2842 while (cur != NULL) { |
2843 DCHECK(cur->map() == cur->GetHeap()->root(Heap::kFreeSpaceMapRootIndex)); | 2843 DCHECK(cur->map() == cur->GetHeap()->root(Heap::kFreeSpaceMapRootIndex)); |
2844 sum += cur->nobarrier_size(); | 2844 sum += cur->relaxed_read_size(); |
2845 cur = cur->next(); | 2845 cur = cur->next(); |
2846 } | 2846 } |
2847 return sum; | 2847 return sum; |
2848 } | 2848 } |
2849 | 2849 |
2850 int FreeListCategory::FreeListLength() { | 2850 int FreeListCategory::FreeListLength() { |
2851 int length = 0; | 2851 int length = 0; |
2852 FreeSpace* cur = top(); | 2852 FreeSpace* cur = top(); |
2853 while (cur != NULL) { | 2853 while (cur != NULL) { |
2854 length++; | 2854 length++; |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 PrintF("\n"); | 3398 PrintF("\n"); |
3399 } | 3399 } |
3400 printf(" --------------------------------------\n"); | 3400 printf(" --------------------------------------\n"); |
3401 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, | 3401 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, |
3402 MarkingState::Internal(this).live_bytes()); | 3402 MarkingState::Internal(this).live_bytes()); |
3403 } | 3403 } |
3404 | 3404 |
3405 #endif // DEBUG | 3405 #endif // DEBUG |
3406 } // namespace internal | 3406 } // namespace internal |
3407 } // namespace v8 | 3407 } // namespace v8 |
OLD | NEW |