| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
| 9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 PageIterator it(this); | 1048 PageIterator it(this); |
| 1049 int count = 0; | 1049 int count = 0; |
| 1050 while (it.has_next()) { | 1050 while (it.has_next()) { |
| 1051 it.next(); | 1051 it.next(); |
| 1052 count++; | 1052 count++; |
| 1053 } | 1053 } |
| 1054 return count; | 1054 return count; |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 | 1057 |
| 1058 void PagedSpace::ObtainFreeListStatistics(Page* page, SizeStats* sizes) { | |
| 1059 sizes->huge_size_ = page->available_in_huge_free_list(); | |
| 1060 sizes->small_size_ = page->available_in_small_free_list(); | |
| 1061 sizes->medium_size_ = page->available_in_medium_free_list(); | |
| 1062 sizes->large_size_ = page->available_in_large_free_list(); | |
| 1063 } | |
| 1064 | |
| 1065 | |
| 1066 void PagedSpace::ResetFreeListStatistics() { | 1058 void PagedSpace::ResetFreeListStatistics() { |
| 1067 PageIterator page_iterator(this); | 1059 PageIterator page_iterator(this); |
| 1068 while (page_iterator.has_next()) { | 1060 while (page_iterator.has_next()) { |
| 1069 Page* page = page_iterator.next(); | 1061 Page* page = page_iterator.next(); |
| 1070 page->ResetFreeListStatistics(); | 1062 page->ResetFreeListStatistics(); |
| 1071 } | 1063 } |
| 1072 } | 1064 } |
| 1073 | 1065 |
| 1074 | 1066 |
| 1075 void PagedSpace::IncreaseCapacity(int size) { | 1067 void PagedSpace::IncreaseCapacity(int size) { |
| (...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3133 object->ShortPrint(); | 3125 object->ShortPrint(); |
| 3134 PrintF("\n"); | 3126 PrintF("\n"); |
| 3135 } | 3127 } |
| 3136 printf(" --------------------------------------\n"); | 3128 printf(" --------------------------------------\n"); |
| 3137 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3129 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3138 } | 3130 } |
| 3139 | 3131 |
| 3140 #endif // DEBUG | 3132 #endif // DEBUG |
| 3141 } | 3133 } |
| 3142 } // namespace v8::internal | 3134 } // namespace v8::internal |
| OLD | NEW |