Commit 9eedb1ba authored by Keishi Hattori's avatar Keishi Hattori Committed by Commit Bot

Fix OomInterventionConfig default threshold

When no threshold is specified in FieldTrialParam, the default theshold was suppose to be 10% of system RAM, but actually it was set to 10 bytes.
blink_workload_threshold's unit is bytes.

Bug: 927599
Change-Id: I211347bdee5938b85ff27e29c694bf27906de6c0
Reviewed-on: https://chromium-review.googlesource.com/c/1448006Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarYuzu Saijo <yuzus@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628263}
parent 15285b0d
...@@ -138,11 +138,11 @@ OomInterventionConfig::OomInterventionConfig() ...@@ -138,11 +138,11 @@ OomInterventionConfig::OomInterventionConfig()
is_swap_monitor_enabled_ = false; is_swap_monitor_enabled_ = false;
status = OomInterventionBrowserMonitorStatus::kEnabledWithNoSwap; status = OomInterventionBrowserMonitorStatus::kEnabledWithNoSwap;
} }
// If no threshold is specified, set blink_workload_threshold to 10 by // If no threshold is specified, set blink_workload_threshold to 10% of the
// default, meaning that 10% of the RAM size is set to blink memory usage // RAM size.
// threshold to trigger intervention.
if (!GetRendererMemoryThresholds(&renderer_detection_args_)) { if (!GetRendererMemoryThresholds(&renderer_detection_args_)) {
renderer_detection_args_->blink_workload_threshold = 10; renderer_detection_args_->blink_workload_threshold =
base::SysInfo::AmountOfPhysicalMemory() * 0.1;
} }
} }
......
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