Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 361983003: Wait for sweeper threads only if we have to. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698