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

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

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (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
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 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 // evacuation. 3079 // evacuation.
3080 static int PageEvacuationThreshold() { 3080 static int PageEvacuationThreshold() {
3081 if (FLAG_page_promotion) 3081 if (FLAG_page_promotion)
3082 return FLAG_page_promotion_threshold * Page::kAllocatableMemory / 100; 3082 return FLAG_page_promotion_threshold * Page::kAllocatableMemory / 100;
3083 return Page::kAllocatableMemory + kPointerSize; 3083 return Page::kAllocatableMemory + kPointerSize;
3084 } 3084 }
3085 3085
3086 explicit Evacuator(MarkCompactCollector* collector) 3086 explicit Evacuator(MarkCompactCollector* collector)
3087 : collector_(collector), 3087 : collector_(collector),
3088 compaction_spaces_(collector->heap()), 3088 compaction_spaces_(collector->heap()),
3089 local_pretenuring_feedback_(base::HashMap::PointersMatch, 3089 local_pretenuring_feedback_(kInitialLocalPretenuringFeedbackCapacity),
3090 kInitialLocalPretenuringFeedbackCapacity),
3091 new_space_visitor_(collector->heap(), &compaction_spaces_, 3090 new_space_visitor_(collector->heap(), &compaction_spaces_,
3092 &local_pretenuring_feedback_), 3091 &local_pretenuring_feedback_),
3093 new_space_page_visitor(collector->heap()), 3092 new_space_page_visitor(collector->heap()),
3094 old_space_visitor_(collector->heap(), &compaction_spaces_), 3093 old_space_visitor_(collector->heap(), &compaction_spaces_),
3095 duration_(0.0), 3094 duration_(0.0),
3096 bytes_compacted_(0) {} 3095 bytes_compacted_(0) {}
3097 3096
3098 inline bool EvacuatePage(Page* chunk); 3097 inline bool EvacuatePage(Page* chunk);
3099 3098
3100 // Merge back locally cached info sequentially. Note that this method needs 3099 // Merge back locally cached info sequentially. Note that this method needs
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
4042 // The target is always in old space, we don't have to record the slot in 4041 // The target is always in old space, we don't have to record the slot in
4043 // the old-to-new remembered set. 4042 // the old-to-new remembered set.
4044 DCHECK(!heap()->InNewSpace(target)); 4043 DCHECK(!heap()->InNewSpace(target));
4045 RecordRelocSlot(host, &rinfo, target); 4044 RecordRelocSlot(host, &rinfo, target);
4046 } 4045 }
4047 } 4046 }
4048 } 4047 }
4049 4048
4050 } // namespace internal 4049 } // namespace internal
4051 } // namespace v8 4050 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | src/profiler/heap-snapshot-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698