OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4079 FreeList* free_list = space == heap()->old_pointer_space() | 4079 FreeList* free_list = space == heap()->old_pointer_space() |
4080 ? free_list_old_pointer_space_.get() | 4080 ? free_list_old_pointer_space_.get() |
4081 : free_list_old_data_space_.get(); | 4081 : free_list_old_data_space_.get(); |
4082 FreeList private_free_list(space); | 4082 FreeList private_free_list(space); |
4083 while (it.has_next()) { | 4083 while (it.has_next()) { |
4084 Page* p = it.next(); | 4084 Page* p = it.next(); |
4085 | 4085 |
4086 if (p->TryParallelSweeping()) { | 4086 if (p->TryParallelSweeping()) { |
4087 SweepConservatively<SWEEP_IN_PARALLEL>(space, &private_free_list, p); | 4087 SweepConservatively<SWEEP_IN_PARALLEL>(space, &private_free_list, p); |
4088 free_list->Concatenate(&private_free_list); | 4088 free_list->Concatenate(&private_free_list); |
| 4089 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_FINALIZE); |
4089 } | 4090 } |
4090 } | 4091 } |
4091 } | 4092 } |
4092 | 4093 |
4093 | 4094 |
4094 void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { | 4095 void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { |
4095 space->set_was_swept_conservatively(sweeper == CONSERVATIVE || | 4096 space->set_was_swept_conservatively(sweeper == CONSERVATIVE || |
4096 sweeper == LAZY_CONSERVATIVE || | 4097 sweeper == LAZY_CONSERVATIVE || |
4097 sweeper == PARALLEL_CONSERVATIVE || | 4098 sweeper == PARALLEL_CONSERVATIVE || |
4098 sweeper == CONCURRENT_CONSERVATIVE); | 4099 sweeper == CONCURRENT_CONSERVATIVE); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4277 | 4278 |
4278 // Deallocate evacuated candidate pages. | 4279 // Deallocate evacuated candidate pages. |
4279 ReleaseEvacuationCandidates(); | 4280 ReleaseEvacuationCandidates(); |
4280 } | 4281 } |
4281 | 4282 |
4282 | 4283 |
4283 void MarkCompactCollector::ParallelSweepSpaceComplete(PagedSpace* space) { | 4284 void MarkCompactCollector::ParallelSweepSpaceComplete(PagedSpace* space) { |
4284 PageIterator it(space); | 4285 PageIterator it(space); |
4285 while (it.has_next()) { | 4286 while (it.has_next()) { |
4286 Page* p = it.next(); | 4287 Page* p = it.next(); |
4287 if (p->parallel_sweeping() == MemoryChunk::PARALLEL_SWEEPING_IN_PROGRESS) { | 4288 if (p->parallel_sweeping() == MemoryChunk::PARALLEL_SWEEPING_FINALIZE) { |
4288 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_DONE); | 4289 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_DONE); |
4289 p->MarkSweptConservatively(); | 4290 p->MarkSweptConservatively(); |
4290 } | 4291 } |
| 4292 ASSERT(p->parallel_sweeping() == MemoryChunk::PARALLEL_SWEEPING_DONE); |
4291 } | 4293 } |
4292 } | 4294 } |
4293 | 4295 |
4294 | 4296 |
4295 void MarkCompactCollector::ParallelSweepSpacesComplete() { | 4297 void MarkCompactCollector::ParallelSweepSpacesComplete() { |
4296 ParallelSweepSpaceComplete(heap()->old_pointer_space()); | 4298 ParallelSweepSpaceComplete(heap()->old_pointer_space()); |
4297 ParallelSweepSpaceComplete(heap()->old_data_space()); | 4299 ParallelSweepSpaceComplete(heap()->old_data_space()); |
4298 } | 4300 } |
4299 | 4301 |
4300 | 4302 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4518 while (buffer != NULL) { | 4520 while (buffer != NULL) { |
4519 SlotsBuffer* next_buffer = buffer->next(); | 4521 SlotsBuffer* next_buffer = buffer->next(); |
4520 DeallocateBuffer(buffer); | 4522 DeallocateBuffer(buffer); |
4521 buffer = next_buffer; | 4523 buffer = next_buffer; |
4522 } | 4524 } |
4523 *buffer_address = NULL; | 4525 *buffer_address = NULL; |
4524 } | 4526 } |
4525 | 4527 |
4526 | 4528 |
4527 } } // namespace v8::internal | 4529 } } // namespace v8::internal |
OLD | NEW |