| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 page->ClearLiveness(); | 383 page->ClearLiveness(); |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 | 386 |
| 387 | 387 |
| 388 void MarkCompactCollector::ClearMarkbits() { | 388 void MarkCompactCollector::ClearMarkbits() { |
| 389 ClearMarkbitsInPagedSpace(heap_->code_space()); | 389 ClearMarkbitsInPagedSpace(heap_->code_space()); |
| 390 ClearMarkbitsInPagedSpace(heap_->map_space()); | 390 ClearMarkbitsInPagedSpace(heap_->map_space()); |
| 391 ClearMarkbitsInPagedSpace(heap_->old_space()); | 391 ClearMarkbitsInPagedSpace(heap_->old_space()); |
| 392 ClearMarkbitsInNewSpace(heap_->new_space()); | 392 ClearMarkbitsInNewSpace(heap_->new_space()); |
| 393 | 393 heap_->lo_space()->ClearMarkingStateOfLiveObjects(); |
| 394 LargeObjectIterator it(heap_->lo_space()); | |
| 395 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { | |
| 396 ObjectMarking::ClearMarkBit(obj); | |
| 397 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | |
| 398 chunk->ResetProgressBar(); | |
| 399 chunk->ResetLiveBytes(); | |
| 400 } | |
| 401 } | 394 } |
| 402 | 395 |
| 403 class MarkCompactCollector::Sweeper::SweeperTask : public v8::Task { | 396 class MarkCompactCollector::Sweeper::SweeperTask : public v8::Task { |
| 404 public: | 397 public: |
| 405 SweeperTask(Sweeper* sweeper, base::Semaphore* pending_sweeper_tasks, | 398 SweeperTask(Sweeper* sweeper, base::Semaphore* pending_sweeper_tasks, |
| 406 AllocationSpace space_to_start) | 399 AllocationSpace space_to_start) |
| 407 : sweeper_(sweeper), | 400 : sweeper_(sweeper), |
| 408 pending_sweeper_tasks_(pending_sweeper_tasks), | 401 pending_sweeper_tasks_(pending_sweeper_tasks), |
| 409 space_to_start_(space_to_start) {} | 402 space_to_start_(space_to_start) {} |
| 410 | 403 |
| (...skipping 3654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4065 // The target is always in old space, we don't have to record the slot in | 4058 // The target is always in old space, we don't have to record the slot in |
| 4066 // the old-to-new remembered set. | 4059 // the old-to-new remembered set. |
| 4067 DCHECK(!heap()->InNewSpace(target)); | 4060 DCHECK(!heap()->InNewSpace(target)); |
| 4068 RecordRelocSlot(host, &rinfo, target); | 4061 RecordRelocSlot(host, &rinfo, target); |
| 4069 } | 4062 } |
| 4070 } | 4063 } |
| 4071 } | 4064 } |
| 4072 | 4065 |
| 4073 } // namespace internal | 4066 } // namespace internal |
| 4074 } // namespace v8 | 4067 } // namespace v8 |
| OLD | NEW |