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

Unified Diff: src/heap.h

Issue 8234002: New flag --stress-compaction (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: src/heap.h
===================================================================
--- src/heap.h (revision 9578)
+++ src/heap.h (working copy)
@@ -1031,6 +1031,9 @@
}
Object* global_contexts_list() { return global_contexts_list_; }
+ // Number of mark-sweeps.
+ int ms_count() { return ms_count_; }
+
// Iterates over all roots in the heap.
void IterateRoots(ObjectVisitor* v, VisitMode mode);
// Iterates over all strong roots in the heap.
@@ -1243,16 +1246,20 @@
}
intptr_t OldGenPromotionLimit(intptr_t old_gen_size) {
+ static int divisor = 3;
Vyacheslav Egorov (Chromium) 2011/10/11 13:55:29 it does not have to be static. just have int divis
Sven Panne 2011/10/11 14:02:15 *const* int divisor = ... ;-)
+ if (FLAG_stress_compaction) divisor = 10;
intptr_t limit =
- Max(old_gen_size + old_gen_size / 3, kMinimumPromotionLimit);
+ Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit);
limit += new_space_.Capacity();
limit *= old_gen_limit_factor_;
return limit;
}
intptr_t OldGenAllocationLimit(intptr_t old_gen_size) {
+ static int divisor = 2;
Vyacheslav Egorov (Chromium) 2011/10/11 13:55:29 ditto
Sven Panne 2011/10/11 14:02:15 ditto
+ if (FLAG_stress_compaction) divisor = 8;
intptr_t limit =
- Max(old_gen_size + old_gen_size / 2, kMinimumAllocationLimit);
+ Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit);
limit += new_space_.Capacity();
limit *= old_gen_limit_factor_;
return limit;
« no previous file with comments | « src/flag-definitions.h ('k') | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698