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 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3028 code_slots_filtering_required); | 3028 code_slots_filtering_required); |
3029 if (FLAG_trace_fragmentation) { | 3029 if (FLAG_trace_fragmentation) { |
3030 PrintF(" migration slots buffer: %d\n", | 3030 PrintF(" migration slots buffer: %d\n", |
3031 SlotsBuffer::SizeOfChain(migration_slots_buffer_)); | 3031 SlotsBuffer::SizeOfChain(migration_slots_buffer_)); |
3032 } | 3032 } |
3033 | 3033 |
3034 if (compacting_ && was_marked_incrementally_) { | 3034 if (compacting_ && was_marked_incrementally_) { |
3035 // It's difficult to filter out slots recorded for large objects. | 3035 // It's difficult to filter out slots recorded for large objects. |
3036 LargeObjectIterator it(heap_->lo_space()); | 3036 LargeObjectIterator it(heap_->lo_space()); |
3037 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { | 3037 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { |
| 3038 // LargeObjectSpace is not swept yet thus we have to skip |
| 3039 // dead objects explicitly. |
| 3040 if (!IsMarked(obj)) continue; |
| 3041 |
3038 Page* p = Page::FromAddress(obj->address()); | 3042 Page* p = Page::FromAddress(obj->address()); |
3039 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) { | 3043 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) { |
3040 obj->Iterate(&updating_visitor); | 3044 obj->Iterate(&updating_visitor); |
3041 p->ClearFlag(Page::RESCAN_ON_EVACUATION); | 3045 p->ClearFlag(Page::RESCAN_ON_EVACUATION); |
3042 } | 3046 } |
3043 } | 3047 } |
3044 } | 3048 } |
3045 | 3049 |
3046 int npages = evacuation_candidates_.length(); | 3050 int npages = evacuation_candidates_.length(); |
3047 for (int i = 0; i < npages; i++) { | 3051 for (int i = 0; i < npages; i++) { |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3840 while (buffer != NULL) { | 3844 while (buffer != NULL) { |
3841 SlotsBuffer* next_buffer = buffer->next(); | 3845 SlotsBuffer* next_buffer = buffer->next(); |
3842 DeallocateBuffer(buffer); | 3846 DeallocateBuffer(buffer); |
3843 buffer = next_buffer; | 3847 buffer = next_buffer; |
3844 } | 3848 } |
3845 *buffer_address = NULL; | 3849 *buffer_address = NULL; |
3846 } | 3850 } |
3847 | 3851 |
3848 | 3852 |
3849 } } // namespace v8::internal | 3853 } } // namespace v8::internal |
OLD | NEW |