Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/heap/mark-compact.cc

Issue 2390743005: [heap] Concurrently free empty slot set buckets. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/remembered-set.h » ('j') | src/heap/slot-set.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/heap/remembered-set.h » ('j') | src/heap/slot-set.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698