Commit b528d077 authored by ulan's avatar ulan Committed by Commit bot

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=

Review URL: https://codereview.chromium.org/1280703002

Cr-Commit-Position: refs/heads/master@{#30060}
parent ddcec9f6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment