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 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 // As a temporary solution we call GC twice. | 2573 // As a temporary solution we call GC twice. |
2574 heap_->CollectAllGarbage( | 2574 heap_->CollectAllGarbage( |
2575 Heap::kMakeHeapIterableMask, | 2575 Heap::kMakeHeapIterableMask, |
2576 "HeapSnapshotGenerator::GenerateSnapshot"); | 2576 "HeapSnapshotGenerator::GenerateSnapshot"); |
2577 heap_->CollectAllGarbage( | 2577 heap_->CollectAllGarbage( |
2578 Heap::kMakeHeapIterableMask, | 2578 Heap::kMakeHeapIterableMask, |
2579 "HeapSnapshotGenerator::GenerateSnapshot"); | 2579 "HeapSnapshotGenerator::GenerateSnapshot"); |
2580 | 2580 |
2581 #ifdef VERIFY_HEAP | 2581 #ifdef VERIFY_HEAP |
2582 Heap* debug_heap = heap_; | 2582 Heap* debug_heap = heap_; |
2583 CHECK(debug_heap->old_data_space()->swept_precisely()); | |
2584 CHECK(debug_heap->old_pointer_space()->swept_precisely()); | |
2585 CHECK(debug_heap->code_space()->swept_precisely()); | |
2586 CHECK(debug_heap->cell_space()->swept_precisely()); | |
2587 CHECK(debug_heap->property_cell_space()->swept_precisely()); | |
2588 CHECK(debug_heap->map_space()->swept_precisely()); | |
2589 #endif | |
2590 | |
2591 #ifdef VERIFY_HEAP | |
2592 debug_heap->Verify(); | 2583 debug_heap->Verify(); |
2593 #endif | 2584 #endif |
2594 | 2585 |
2595 SetProgressTotal(2); // 2 passes. | 2586 SetProgressTotal(2); // 2 passes. |
2596 | 2587 |
2597 #ifdef VERIFY_HEAP | 2588 #ifdef VERIFY_HEAP |
2598 debug_heap->Verify(); | 2589 debug_heap->Verify(); |
2599 #endif | 2590 #endif |
2600 | 2591 |
2601 if (!FillReferences()) return false; | 2592 if (!FillReferences()) return false; |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3164 writer_->AddString("\"<dummy>\""); | 3155 writer_->AddString("\"<dummy>\""); |
3165 for (int i = 1; i < sorted_strings.length(); ++i) { | 3156 for (int i = 1; i < sorted_strings.length(); ++i) { |
3166 writer_->AddCharacter(','); | 3157 writer_->AddCharacter(','); |
3167 SerializeString(sorted_strings[i]); | 3158 SerializeString(sorted_strings[i]); |
3168 if (writer_->aborted()) return; | 3159 if (writer_->aborted()) return; |
3169 } | 3160 } |
3170 } | 3161 } |
3171 | 3162 |
3172 | 3163 |
3173 } } // namespace v8::internal | 3164 } } // namespace v8::internal |
OLD | NEW |