| 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 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 // This counter will be increased for pages which will be swept by the | 2562 // This counter will be increased for pages which will be swept by the |
| 2563 // sweeper threads. | 2563 // sweeper threads. |
| 2564 unswept_free_bytes_ = 0; | 2564 unswept_free_bytes_ = 0; |
| 2565 | 2565 |
| 2566 // Clear the free list before a full GC---it will be rebuilt afterward. | 2566 // Clear the free list before a full GC---it will be rebuilt afterward. |
| 2567 free_list_.Reset(); | 2567 free_list_.Reset(); |
| 2568 } | 2568 } |
| 2569 | 2569 |
| 2570 | 2570 |
| 2571 intptr_t PagedSpace::SizeOfObjects() { | 2571 intptr_t PagedSpace::SizeOfObjects() { |
| 2572 DCHECK(FLAG_predictable || | 2572 DCHECK(!FLAG_concurrent_sweeping || |
| 2573 heap()->mark_compact_collector()->sweeping_in_progress() || | 2573 heap()->mark_compact_collector()->sweeping_in_progress() || |
| 2574 (unswept_free_bytes_ == 0)); | 2574 (unswept_free_bytes_ == 0)); |
| 2575 return Size() - unswept_free_bytes_ - (limit() - top()); | 2575 return Size() - unswept_free_bytes_ - (limit() - top()); |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 | 2578 |
| 2579 // After we have booted, we have created a map which represents free space | 2579 // After we have booted, we have created a map which represents free space |
| 2580 // on the heap. If there was already a free list then the elements on it | 2580 // on the heap. If there was already a free list then the elements on it |
| 2581 // were created with the wrong FreeSpaceMap (normally NULL), so we need to | 2581 // were created with the wrong FreeSpaceMap (normally NULL), so we need to |
| 2582 // fix them. | 2582 // fix them. |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3166 object->ShortPrint(); | 3166 object->ShortPrint(); |
| 3167 PrintF("\n"); | 3167 PrintF("\n"); |
| 3168 } | 3168 } |
| 3169 printf(" --------------------------------------\n"); | 3169 printf(" --------------------------------------\n"); |
| 3170 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3170 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3171 } | 3171 } |
| 3172 | 3172 |
| 3173 #endif // DEBUG | 3173 #endif // DEBUG |
| 3174 } | 3174 } |
| 3175 } // namespace v8::internal | 3175 } // namespace v8::internal |
| OLD | NEW |