| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 387 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
| 388 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 388 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
| 389 | 389 |
| 390 // It's difficult to filter out slots recorded for large objects. | 390 // It's difficult to filter out slots recorded for large objects. |
| 391 if (chunk->owner()->identity() == LO_SPACE && | 391 if (chunk->owner()->identity() == LO_SPACE && |
| 392 chunk->size() > static_cast<size_t>(Page::kPageSize) && | 392 chunk->size() > static_cast<size_t>(Page::kPageSize) && |
| 393 is_compacting) { | 393 is_compacting) { |
| 394 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); | 394 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); |
| 395 } | 395 } |
| 396 } else if (chunk->owner()->identity() == CELL_SPACE || | 396 } else if (chunk->owner()->identity() == CELL_SPACE || |
| 397 chunk->owner()->identity() == PROPERTY_CELL_SPACE || |
| 397 chunk->scan_on_scavenge()) { | 398 chunk->scan_on_scavenge()) { |
| 398 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 399 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
| 399 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 400 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
| 400 } else { | 401 } else { |
| 401 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); | 402 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); |
| 402 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 403 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
| 403 } | 404 } |
| 404 } | 405 } |
| 405 | 406 |
| 406 | 407 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 433 NewSpacePage* p = it.next(); | 434 NewSpacePage* p = it.next(); |
| 434 SetNewSpacePageFlags(p, false); | 435 SetNewSpacePageFlags(p, false); |
| 435 } | 436 } |
| 436 } | 437 } |
| 437 | 438 |
| 438 | 439 |
| 439 void IncrementalMarking::DeactivateIncrementalWriteBarrier() { | 440 void IncrementalMarking::DeactivateIncrementalWriteBarrier() { |
| 440 DeactivateIncrementalWriteBarrierForSpace(heap_->old_pointer_space()); | 441 DeactivateIncrementalWriteBarrierForSpace(heap_->old_pointer_space()); |
| 441 DeactivateIncrementalWriteBarrierForSpace(heap_->old_data_space()); | 442 DeactivateIncrementalWriteBarrierForSpace(heap_->old_data_space()); |
| 442 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space()); | 443 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space()); |
| 444 DeactivateIncrementalWriteBarrierForSpace(heap_->property_cell_space()); |
| 443 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space()); | 445 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space()); |
| 444 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space()); | 446 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space()); |
| 445 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space()); | 447 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space()); |
| 446 | 448 |
| 447 LargePage* lop = heap_->lo_space()->first_page(); | 449 LargePage* lop = heap_->lo_space()->first_page(); |
| 448 while (lop->is_valid()) { | 450 while (lop->is_valid()) { |
| 449 SetOldSpacePageFlags(lop, false, false); | 451 SetOldSpacePageFlags(lop, false, false); |
| 450 lop = lop->next_page(); | 452 lop = lop->next_page(); |
| 451 } | 453 } |
| 452 } | 454 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 467 NewSpacePage* p = it.next(); | 469 NewSpacePage* p = it.next(); |
| 468 SetNewSpacePageFlags(p, true); | 470 SetNewSpacePageFlags(p, true); |
| 469 } | 471 } |
| 470 } | 472 } |
| 471 | 473 |
| 472 | 474 |
| 473 void IncrementalMarking::ActivateIncrementalWriteBarrier() { | 475 void IncrementalMarking::ActivateIncrementalWriteBarrier() { |
| 474 ActivateIncrementalWriteBarrier(heap_->old_pointer_space()); | 476 ActivateIncrementalWriteBarrier(heap_->old_pointer_space()); |
| 475 ActivateIncrementalWriteBarrier(heap_->old_data_space()); | 477 ActivateIncrementalWriteBarrier(heap_->old_data_space()); |
| 476 ActivateIncrementalWriteBarrier(heap_->cell_space()); | 478 ActivateIncrementalWriteBarrier(heap_->cell_space()); |
| 479 ActivateIncrementalWriteBarrier(heap_->property_cell_space()); |
| 477 ActivateIncrementalWriteBarrier(heap_->map_space()); | 480 ActivateIncrementalWriteBarrier(heap_->map_space()); |
| 478 ActivateIncrementalWriteBarrier(heap_->code_space()); | 481 ActivateIncrementalWriteBarrier(heap_->code_space()); |
| 479 ActivateIncrementalWriteBarrier(heap_->new_space()); | 482 ActivateIncrementalWriteBarrier(heap_->new_space()); |
| 480 | 483 |
| 481 LargePage* lop = heap_->lo_space()->first_page(); | 484 LargePage* lop = heap_->lo_space()->first_page(); |
| 482 while (lop->is_valid()) { | 485 while (lop->is_valid()) { |
| 483 SetOldSpacePageFlags(lop, true, is_compacting_); | 486 SetOldSpacePageFlags(lop, true, is_compacting_); |
| 484 lop = lop->next_page(); | 487 lop = lop->next_page(); |
| 485 } | 488 } |
| 486 } | 489 } |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 bytes_scanned_ = 0; | 1031 bytes_scanned_ = 0; |
| 1029 write_barriers_invoked_since_last_step_ = 0; | 1032 write_barriers_invoked_since_last_step_ = 0; |
| 1030 } | 1033 } |
| 1031 | 1034 |
| 1032 | 1035 |
| 1033 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 1036 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 1034 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1037 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
| 1035 } | 1038 } |
| 1036 | 1039 |
| 1037 } } // namespace v8::internal | 1040 } } // namespace v8::internal |
| OLD | NEW |