| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3823 } else if (identity == CODE_SPACE) { | 3823 } else if (identity == CODE_SPACE) { |
| 3824 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); | 3824 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); |
| 3825 } else { | 3825 } else { |
| 3826 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); | 3826 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); |
| 3827 } | 3827 } |
| 3828 | 3828 |
| 3829 // After finishing sweeping of a page we clean up its remembered set. | 3829 // After finishing sweeping of a page we clean up its remembered set. |
| 3830 if (page->typed_old_to_new_slots()) { | 3830 if (page->typed_old_to_new_slots()) { |
| 3831 page->typed_old_to_new_slots()->FreeToBeFreedChunks(); | 3831 page->typed_old_to_new_slots()->FreeToBeFreedChunks(); |
| 3832 } | 3832 } |
| 3833 if (page->old_to_new_slots()) { |
| 3834 page->old_to_new_slots()->FreeToBeFreedBuckets(); |
| 3835 } |
| 3833 | 3836 |
| 3834 { | 3837 { |
| 3835 base::LockGuard<base::Mutex> guard(&mutex_); | 3838 base::LockGuard<base::Mutex> guard(&mutex_); |
| 3836 swept_list_[identity].Add(page); | 3839 swept_list_[identity].Add(page); |
| 3837 } | 3840 } |
| 3838 page->concurrent_sweeping_state().SetValue(Page::kSweepingDone); | 3841 page->concurrent_sweeping_state().SetValue(Page::kSweepingDone); |
| 3839 page->mutex()->Unlock(); | 3842 page->mutex()->Unlock(); |
| 3840 } | 3843 } |
| 3841 return max_freed; | 3844 return max_freed; |
| 3842 } | 3845 } |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3998 // The target is always in old space, we don't have to record the slot in | 4001 // The target is always in old space, we don't have to record the slot in |
| 3999 // the old-to-new remembered set. | 4002 // the old-to-new remembered set. |
| 4000 DCHECK(!heap()->InNewSpace(target)); | 4003 DCHECK(!heap()->InNewSpace(target)); |
| 4001 RecordRelocSlot(host, &rinfo, target); | 4004 RecordRelocSlot(host, &rinfo, target); |
| 4002 } | 4005 } |
| 4003 } | 4006 } |
| 4004 } | 4007 } |
| 4005 | 4008 |
| 4006 } // namespace internal | 4009 } // namespace internal |
| 4007 } // namespace v8 | 4010 } // namespace v8 |
| OLD | NEW |