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

Unified Diff: src/heap/heap.h

Issue 1090963002: Use smaller heap growing factor in idle notification to start incremental marking when there is idl… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 4f624a3ab4b538d0b0eb128fc094516d6e03883c..88b0868b681f87fa66e02a700051c780ee724f63 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1225,13 +1225,13 @@ class Heap {
survived_since_last_expansion_ += survived;
}
- inline bool NextGCIsLikelyToBeFull() {
+ inline bool NextGCIsLikelyToBeFull(intptr_t limit = 0) {
ulan 2015/04/16 14:17:22 Always pass the limit (either the old_generation_a
Hannes Payer (out of office) 2015/04/16 14:46:45 Done.
if (FLAG_gc_global) return true;
if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true;
- intptr_t adjusted_allocation_limit =
- old_generation_allocation_limit_ - new_space_.Capacity();
+ if (limit == 0) limit = old_generation_allocation_limit_;
+ intptr_t adjusted_allocation_limit = limit - new_space_.Capacity();
if (PromotedTotalSize() >= adjusted_allocation_limit) return true;
@@ -1633,6 +1633,19 @@ class Heap {
// generation and on every allocation in large object space.
intptr_t old_generation_allocation_limit_;
+ // The minimum factor used to grow the old generation.
ulan 2015/04/16 14:17:22 Each additional state variable complicates GC sche
Hannes Payer (out of office) 2015/04/16 14:46:45 Done.
+ double min_old_generation_growing_factor_;
Erik Corry Chromium.org 2015/04/16 14:16:44 This never changes.
Hannes Payer (out of office) 2015/04/16 14:46:45 Done.
+
+ // The maximum factor used to grow the old generation.
+ double max_old_generation_growing_factor_;
+
+ // The factor used in the idle notification to grow the old generation.
+ double idle_old_generation_growing_factor_;
Erik Corry Chromium.org 2015/04/16 14:16:44 This never changes. I think it keeps things simpl
Hannes Payer (out of office) 2015/04/16 14:46:45 Done.
+
+ // The currently used old generation growing factor determined by the heap
+ // growing strategy (not by the idle notification).
+ double current_old_generation_growing_factor_;
+
// Indicates that an allocation has failed in the old generation since the
// last GC.
bool old_gen_exhausted_;

Powered by Google App Engine
This is Rietveld 408576698