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 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 // As a temporary solution we call GC twice. | 2579 // As a temporary solution we call GC twice. |
2580 heap_->CollectAllGarbage( | 2580 heap_->CollectAllGarbage( |
2581 Heap::kMakeHeapIterableMask, | 2581 Heap::kMakeHeapIterableMask, |
2582 "HeapSnapshotGenerator::GenerateSnapshot"); | 2582 "HeapSnapshotGenerator::GenerateSnapshot"); |
2583 heap_->CollectAllGarbage( | 2583 heap_->CollectAllGarbage( |
2584 Heap::kMakeHeapIterableMask, | 2584 Heap::kMakeHeapIterableMask, |
2585 "HeapSnapshotGenerator::GenerateSnapshot"); | 2585 "HeapSnapshotGenerator::GenerateSnapshot"); |
2586 | 2586 |
2587 #ifdef VERIFY_HEAP | 2587 #ifdef VERIFY_HEAP |
2588 Heap* debug_heap = heap_; | 2588 Heap* debug_heap = heap_; |
2589 CHECK(!debug_heap->old_data_space()->was_swept_conservatively()); | 2589 CHECK(debug_heap->old_data_space()->is_iterable()); |
2590 CHECK(!debug_heap->old_pointer_space()->was_swept_conservatively()); | 2590 CHECK(debug_heap->old_pointer_space()->is_iterable()); |
2591 CHECK(!debug_heap->code_space()->was_swept_conservatively()); | 2591 CHECK(debug_heap->code_space()->is_iterable()); |
2592 CHECK(!debug_heap->cell_space()->was_swept_conservatively()); | 2592 CHECK(debug_heap->cell_space()->is_iterable()); |
2593 CHECK(!debug_heap->property_cell_space()-> | 2593 CHECK(debug_heap->property_cell_space()->is_iterable()); |
2594 was_swept_conservatively()); | 2594 CHECK(debug_heap->map_space()->is_iterable()); |
2595 CHECK(!debug_heap->map_space()->was_swept_conservatively()); | |
2596 #endif | 2595 #endif |
2597 | 2596 |
2598 #ifdef VERIFY_HEAP | 2597 #ifdef VERIFY_HEAP |
2599 debug_heap->Verify(); | 2598 debug_heap->Verify(); |
2600 #endif | 2599 #endif |
2601 | 2600 |
2602 SetProgressTotal(2); // 2 passes. | 2601 SetProgressTotal(2); // 2 passes. |
2603 | 2602 |
2604 #ifdef VERIFY_HEAP | 2603 #ifdef VERIFY_HEAP |
2605 debug_heap->Verify(); | 2604 debug_heap->Verify(); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3171 writer_->AddString("\"<dummy>\""); | 3170 writer_->AddString("\"<dummy>\""); |
3172 for (int i = 1; i < sorted_strings.length(); ++i) { | 3171 for (int i = 1; i < sorted_strings.length(); ++i) { |
3173 writer_->AddCharacter(','); | 3172 writer_->AddCharacter(','); |
3174 SerializeString(sorted_strings[i]); | 3173 SerializeString(sorted_strings[i]); |
3175 if (writer_->aborted()) return; | 3174 if (writer_->aborted()) return; |
3176 } | 3175 } |
3177 } | 3176 } |
3178 | 3177 |
3179 | 3178 |
3180 } } // namespace v8::internal | 3179 } } // namespace v8::internal |
OLD | NEW |