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

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

Issue 2358333002: Revert of [heap] Concurrently free empty typed slot set chunks. (Closed)
Patch Set: Created 4 years, 3 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') | no next file with comments »
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 3847 matching lines...) Expand 10 before | Expand all | Expand 10 after
3858 Heap::ShouldZapGarbage() ? ZAP_FREE_SPACE : IGNORE_FREE_SPACE; 3858 Heap::ShouldZapGarbage() ? ZAP_FREE_SPACE : IGNORE_FREE_SPACE;
3859 if (identity == NEW_SPACE) { 3859 if (identity == NEW_SPACE) {
3860 RawSweep(page, IGNORE_FREE_LIST, free_space_mode); 3860 RawSweep(page, IGNORE_FREE_LIST, free_space_mode);
3861 } else if (identity == OLD_SPACE) { 3861 } else if (identity == OLD_SPACE) {
3862 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); 3862 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode);
3863 } else if (identity == CODE_SPACE) { 3863 } else if (identity == CODE_SPACE) {
3864 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); 3864 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode);
3865 } else { 3865 } else {
3866 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode); 3866 max_freed = RawSweep(page, REBUILD_FREE_LIST, free_space_mode);
3867 } 3867 }
3868
3869 // After finishing sweeping of a page we clean up its remembered set.
3870 if (page->typed_old_to_new_slots()) {
3871 page->typed_old_to_new_slots()->FreeToBeFreedChunks();
3872 }
3873
3874 { 3868 {
3875 base::LockGuard<base::Mutex> guard(&mutex_); 3869 base::LockGuard<base::Mutex> guard(&mutex_);
3876 swept_list_[identity].Add(page); 3870 swept_list_[identity].Add(page);
3877 } 3871 }
3878 page->concurrent_sweeping_state().SetValue(Page::kSweepingDone); 3872 page->concurrent_sweeping_state().SetValue(Page::kSweepingDone);
3879 page->mutex()->Unlock(); 3873 page->mutex()->Unlock();
3880 } 3874 }
3881 return max_freed; 3875 return max_freed;
3882 } 3876 }
3883 3877
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
4048 // The target is always in old space, we don't have to record the slot in 4042 // The target is always in old space, we don't have to record the slot in
4049 // the old-to-new remembered set. 4043 // the old-to-new remembered set.
4050 DCHECK(!heap()->InNewSpace(target)); 4044 DCHECK(!heap()->InNewSpace(target));
4051 RecordRelocSlot(host, &rinfo, target); 4045 RecordRelocSlot(host, &rinfo, target);
4052 } 4046 }
4053 } 4047 }
4054 } 4048 }
4055 4049
4056 } // namespace internal 4050 } // namespace internal
4057 } // namespace v8 4051 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/remembered-set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698