| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/heap-snapshot-generator-inl.h" | 7 #include "src/heap-snapshot-generator-inl.h" |
| 8 | 8 |
| 9 #include "src/allocation-tracker.h" | 9 #include "src/allocation-tracker.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2593 // As a temporary solution we call GC twice. | 2593 // As a temporary solution we call GC twice. |
| 2594 heap_->CollectAllGarbage( | 2594 heap_->CollectAllGarbage( |
| 2595 Heap::kMakeHeapIterableMask, | 2595 Heap::kMakeHeapIterableMask, |
| 2596 "HeapSnapshotGenerator::GenerateSnapshot"); | 2596 "HeapSnapshotGenerator::GenerateSnapshot"); |
| 2597 heap_->CollectAllGarbage( | 2597 heap_->CollectAllGarbage( |
| 2598 Heap::kMakeHeapIterableMask, | 2598 Heap::kMakeHeapIterableMask, |
| 2599 "HeapSnapshotGenerator::GenerateSnapshot"); | 2599 "HeapSnapshotGenerator::GenerateSnapshot"); |
| 2600 | 2600 |
| 2601 #ifdef VERIFY_HEAP | 2601 #ifdef VERIFY_HEAP |
| 2602 Heap* debug_heap = heap_; | 2602 Heap* debug_heap = heap_; |
| 2603 CHECK(debug_heap->old_data_space()->is_iterable()); | 2603 CHECK(debug_heap->old_data_space()->swept_precisely()); |
| 2604 CHECK(debug_heap->old_pointer_space()->is_iterable()); | 2604 CHECK(debug_heap->old_pointer_space()->swept_precisely()); |
| 2605 CHECK(debug_heap->code_space()->is_iterable()); | 2605 CHECK(debug_heap->code_space()->swept_precisely()); |
| 2606 CHECK(debug_heap->cell_space()->is_iterable()); | 2606 CHECK(debug_heap->cell_space()->swept_precisely()); |
| 2607 CHECK(debug_heap->property_cell_space()->is_iterable()); | 2607 CHECK(debug_heap->property_cell_space()->swept_precisely()); |
| 2608 CHECK(debug_heap->map_space()->is_iterable()); | 2608 CHECK(debug_heap->map_space()->swept_precisely()); |
| 2609 #endif | 2609 #endif |
| 2610 | 2610 |
| 2611 #ifdef VERIFY_HEAP | 2611 #ifdef VERIFY_HEAP |
| 2612 debug_heap->Verify(); | 2612 debug_heap->Verify(); |
| 2613 #endif | 2613 #endif |
| 2614 | 2614 |
| 2615 SetProgressTotal(2); // 2 passes. | 2615 SetProgressTotal(2); // 2 passes. |
| 2616 | 2616 |
| 2617 #ifdef VERIFY_HEAP | 2617 #ifdef VERIFY_HEAP |
| 2618 debug_heap->Verify(); | 2618 debug_heap->Verify(); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3184 writer_->AddString("\"<dummy>\""); | 3184 writer_->AddString("\"<dummy>\""); |
| 3185 for (int i = 1; i < sorted_strings.length(); ++i) { | 3185 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3186 writer_->AddCharacter(','); | 3186 writer_->AddCharacter(','); |
| 3187 SerializeString(sorted_strings[i]); | 3187 SerializeString(sorted_strings[i]); |
| 3188 if (writer_->aborted()) return; | 3188 if (writer_->aborted()) return; |
| 3189 } | 3189 } |
| 3190 } | 3190 } |
| 3191 | 3191 |
| 3192 | 3192 |
| 3193 } } // namespace v8::internal | 3193 } } // namespace v8::internal |
| OLD | NEW |