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

Unified Diff: src/heap/mark-compact.cc

Issue 1375703003: Tune evacuation candidate selection. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index d161b1853d8afb662193e416dfa471380f93164b..3664525c0a1d7ba7fae2b77437b34eeab15b413d 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -702,8 +702,12 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
int candidate_count = 0;
int total_live_bytes = 0;
- bool reduce_memory =
- heap()->ShouldReduceMemory() || heap()->HasLowAllocationRate();
+ // The minimum about of memory to make aggresive compaction worthwhile.
Hannes Payer (out of office) 2015/10/01 14:36:07 amount
+ const int kMinPagesToReduceMemory = 16;
+
+ bool reduce_memory = heap()->ShouldReduceMemory() ||
+ (heap()->HasLowAllocationRate() &&
Hannes Payer (out of office) 2015/10/01 14:36:07 As you suggested offline, we can remove the alloca
+ number_of_pages > kMinPageToReduceMemory);
if (FLAG_manual_evacuation_candidates_selection) {
for (size_t i = 0; i < pages.size(); i++) {
Page* p = pages[i].second;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698