Decrease target utilization for foreground apps.
GC time in FormulaEvaluationActions.EvaluateAndApplyChanges goes from
26.1s to 23.2s. Benchmark score goes down ~50 in
FormulaEvaluationActions.EvaluateAndApplyChanges, and up ~50 in
GenericCalcActions.MemAllocTest.
Bug: 8788501
Change-Id: I412af1205f8b67e70a12237c990231ea62167bc0
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 29fe536..57d32bb 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -131,6 +131,7 @@
heap_min_free_ = gc::Heap::kDefaultMinFree;
heap_max_free_ = gc::Heap::kDefaultMaxFree;
heap_target_utilization_ = gc::Heap::kDefaultTargetUtilization;
+ foreground_heap_growth_multiplier_ = gc::Heap::kDefaultHeapGrowthMultiplier;
heap_growth_limit_ = 0; // 0 means no growth limit .
// Default to number of processors minus one since the main GC thread also does work.
parallel_gc_threads_ = sysconf(_SC_NPROCESSORS_CONF) - 1;
@@ -314,6 +315,10 @@
if (!ParseDouble(option, '=', 0.1, 0.9, &heap_target_utilization_)) {
return false;
}
+ } else if (StartsWith(option, "-XX:ForegroundHeapGrowthMultiplier=")) {
+ if (!ParseDouble(option, '=', 0.1, 0.9, &foreground_heap_growth_multiplier_)) {
+ return false;
+ }
} else if (StartsWith(option, "-XX:ParallelGCThreads=")) {
if (!ParseUnsignedInteger(option, '=', ¶llel_gc_threads_)) {
return false;