Reviewers: Hannes Payer,
Message:
PTAL
Description:
Use conservative estimate for GC speed instead of bailing out when computing
mutator utilization.
This makes GC heuristics more robust for small applications that trigger
scavenges but do not trigger full GC.
BUG=
Please review this at https://codereview.chromium.org/1280703002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -1 lines):
M src/heap/heap.cc
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
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.