summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-09-18 06:10:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-18 06:10:35 +0000
commitd41491adb23764f28a80cbb7f2bd7af6491cd892 (patch)
tree3903166bff1fe21eafb9a9d5704f4facc73a1209
parent6d24d4ff06a042ca1c716bea5acbca9733b3a96f (diff)
parent6b2352b41543a7d96f9c13b714781cedf504f766 (diff)
downloadart-d41491adb23764f28a80cbb7f2bd7af6491cd892.tar.gz
art-d41491adb23764f28a80cbb7f2bd7af6491cd892.tar.bz2
art-d41491adb23764f28a80cbb7f2bd7af6491cd892.zip
Merge "Use homogeneous space compact by default if not low memory."
-rw-r--r--runtime/parsed_options.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 6b4f764d6e..2bd994dc57 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -80,7 +80,7 @@ ParsedOptions::ParsedOptions()
gc::kCollectorTypeCMS),
#error "ART default GC type must be set"
#endif
- background_collector_type_(gc::kCollectorTypeHomogeneousSpaceCompact),
+ background_collector_type_(gc::kCollectorTypeNone),
// If background_collector_type_ is
// kCollectorTypeNone, it defaults to the
// collector_type_ after parsing options. If
@@ -696,6 +696,12 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize
return false;
}
}
+ // If not set, background collector type defaults to homogeneous compaction
+ // if not low memory mode, semispace otherwise.
+ if (background_collector_type_ == gc::kCollectorTypeNone) {
+ background_collector_type_ = low_memory_mode_ ?
+ gc::kCollectorTypeSS : gc::kCollectorTypeHomogeneousSpaceCompact;
+ }
// If a reference to the dalvik core.jar snuck in, replace it with
// the art specific version. This can happen with on device