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

Unified Diff: src/heap/heap.cc

Issue 1280703002: Use conservative estimate for GC speed instead of bailing out when computing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index e37c9f6b11de8b333743e8f296486d3561721013..0de520db6b6cd4594df86b78e9a326e253c9d622 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4685,7 +4685,9 @@ void Heap::MakeHeapIterable() {
static double ComputeMutatorUtilization(double mutator_speed, double gc_speed) {
const double kMinMutatorUtilization = 0.0;
- if (mutator_speed == 0 || gc_speed == 0) return kMinMutatorUtilization;
+ const double kConservativeGcSpeedInBytesPerMillisecond = 200000;
+ if (mutator_speed == 0) return kMinMutatorUtilization;
+ if (gc_speed == 0) gc_speed = kConservativeGcSpeedInBytesPerMillisecond;
// Derivation:
// mutator_utilization = mutator_time / (mutator_time + gc_time)
// mutator_time = 1 / mutator_speed
« 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