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

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

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (Closed)
Patch Set: Fix the other simulators 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 | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('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 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after
3038 // evacuation. 3038 // evacuation.
3039 static int PageEvacuationThreshold() { 3039 static int PageEvacuationThreshold() {
3040 if (FLAG_page_promotion) 3040 if (FLAG_page_promotion)
3041 return FLAG_page_promotion_threshold * Page::kAllocatableMemory / 100; 3041 return FLAG_page_promotion_threshold * Page::kAllocatableMemory / 100;
3042 return Page::kAllocatableMemory + kPointerSize; 3042 return Page::kAllocatableMemory + kPointerSize;
3043 } 3043 }
3044 3044
3045 explicit Evacuator(MarkCompactCollector* collector) 3045 explicit Evacuator(MarkCompactCollector* collector)
3046 : collector_(collector), 3046 : collector_(collector),
3047 compaction_spaces_(collector->heap()), 3047 compaction_spaces_(collector->heap()),
3048 local_pretenuring_feedback_(base::HashMap::PointersMatch, 3048 local_pretenuring_feedback_(kInitialLocalPretenuringFeedbackCapacity),
3049 kInitialLocalPretenuringFeedbackCapacity),
3050 new_space_visitor_(collector->heap(), &compaction_spaces_, 3049 new_space_visitor_(collector->heap(), &compaction_spaces_,
3051 &local_pretenuring_feedback_), 3050 &local_pretenuring_feedback_),
3052 new_space_page_visitor(collector->heap()), 3051 new_space_page_visitor(collector->heap()),
3053 old_space_visitor_(collector->heap(), &compaction_spaces_), 3052 old_space_visitor_(collector->heap(), &compaction_spaces_),
3054 duration_(0.0), 3053 duration_(0.0),
3055 bytes_compacted_(0) {} 3054 bytes_compacted_(0) {}
3056 3055
3057 inline bool EvacuatePage(Page* chunk); 3056 inline bool EvacuatePage(Page* chunk);
3058 3057
3059 // Merge back locally cached info sequentially. Note that this method needs 3058 // Merge back locally cached info sequentially. Note that this method needs
(...skipping 938 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 3997 // The target is always in old space, we don't have to record the slot in
3999 // the old-to-new remembered set. 3998 // the old-to-new remembered set.
4000 DCHECK(!heap()->InNewSpace(target)); 3999 DCHECK(!heap()->InNewSpace(target));
4001 RecordRelocSlot(host, &rinfo, target); 4000 RecordRelocSlot(host, &rinfo, target);
4002 } 4001 }
4003 } 4002 }
4004 } 4003 }
4005 4004
4006 } // namespace internal 4005 } // namespace internal
4007 } // namespace v8 4006 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698