Chromium Code Reviews| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 641 if (FLAG_cleanup_code_caches_at_gc) { | 641 if (FLAG_cleanup_code_caches_at_gc) { |
| 642 // We will mark cache black with a separate pass | 642 // We will mark cache black with a separate pass |
| 643 // when we finish marking. | 643 // when we finish marking. |
| 644 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); | 644 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); |
| 645 } | 645 } |
| 646 | 646 |
| 647 // Mark strong roots grey. | 647 // Mark strong roots grey. |
| 648 IncrementalMarkingRootMarkingVisitor visitor(this); | 648 IncrementalMarkingRootMarkingVisitor visitor(this); |
| 649 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 649 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
| 650 | 650 |
| 651 IncrementalMarkingMarkingVisitor::MarkObjectWithoutPush( | |
|
Hannes Payer (out of office)
2013/10/01 13:13:50
Why don't you call MarkWeakObjectToCode here?
ulan
2013/10/01 14:50:29
Done.
| |
| 652 heap_, heap_->weak_object_to_code()); | |
| 653 | |
| 651 // Ready to start incremental marking. | 654 // Ready to start incremental marking. |
| 652 if (FLAG_trace_incremental_marking) { | 655 if (FLAG_trace_incremental_marking) { |
| 653 PrintF("[IncrementalMarking] Running\n"); | 656 PrintF("[IncrementalMarking] Running\n"); |
| 654 } | 657 } |
| 655 } | 658 } |
| 656 | 659 |
| 657 | 660 |
| 658 void IncrementalMarking::PrepareForScavenge() { | 661 void IncrementalMarking::PrepareForScavenge() { |
| 659 if (!IsMarking()) return; | 662 if (!IsMarking()) return; |
| 660 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), | 663 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1033 bytes_scanned_ = 0; | 1036 bytes_scanned_ = 0; |
| 1034 write_barriers_invoked_since_last_step_ = 0; | 1037 write_barriers_invoked_since_last_step_ = 0; |
| 1035 } | 1038 } |
| 1036 | 1039 |
| 1037 | 1040 |
| 1038 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 1041 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 1039 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1042 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
| 1040 } | 1043 } |
| 1041 | 1044 |
| 1042 } } // namespace v8::internal | 1045 } } // namespace v8::internal |
| OLD | NEW |