OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 // We will mark cache black with a separate pass | 734 // We will mark cache black with a separate pass |
735 // when we finish marking. | 735 // when we finish marking. |
736 MarkObjectGreyDoNotEnqueue(ctx->normalized_map_cache()); | 736 MarkObjectGreyDoNotEnqueue(ctx->normalized_map_cache()); |
737 | 737 |
738 VisitGlobalContext(ctx, &marking_visitor); | 738 VisitGlobalContext(ctx, &marking_visitor); |
739 } else { | 739 } else { |
740 obj->IterateBody(map->instance_type(), size, &marking_visitor); | 740 obj->IterateBody(map->instance_type(), size, &marking_visitor); |
741 } | 741 } |
742 | 742 |
743 MarkBit obj_mark_bit = Marking::MarkBitFrom(obj); | 743 MarkBit obj_mark_bit = Marking::MarkBitFrom(obj); |
744 ASSERT(Marking::IsGrey(obj_mark_bit) || | |
745 (obj->IsFiller() && Marking::IsWhite(obj_mark_bit))); | |
746 Marking::MarkBlack(obj_mark_bit); | 744 Marking::MarkBlack(obj_mark_bit); |
747 MemoryChunk::IncrementLiveBytes(obj->address(), size); | 745 MemoryChunk::IncrementLiveBytes(obj->address(), size); |
748 } | 746 } |
749 if (marking_deque_.IsEmpty()) MarkingComplete(); | 747 if (marking_deque_.IsEmpty()) MarkingComplete(); |
750 } | 748 } |
751 | 749 |
752 allocated_ = 0; | 750 allocated_ = 0; |
753 | 751 |
754 steps_count_++; | 752 steps_count_++; |
755 steps_count_since_last_gc_++; | 753 steps_count_since_last_gc_++; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 bytes_rescanned_ = 0; | 809 bytes_rescanned_ = 0; |
812 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 810 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
813 } | 811 } |
814 | 812 |
815 | 813 |
816 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 814 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
817 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 815 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
818 } | 816 } |
819 | 817 |
820 } } // namespace v8::internal | 818 } } // namespace v8::internal |
OLD | NEW |