summaryrefslogtreecommitdiffstats
path: root/runtime/parsed_options.cc
diff options
context:
space:
mode:
authorLin Zang <lin.zang@intel.com>2014-12-12 21:54:47 +0800
committerLin Zang <lin.zang@intel.com>2014-12-12 21:54:47 +0800
commitd0e0d4c833b82ac2639de9dea6042ccb87fe37ed (patch)
treed1508d0dcd02fdca393c609b9244e5ae1c76fcd9 /runtime/parsed_options.cc
parent6b1497421c7c81cb9bf2ce077f1ef3d8ac24cfcb (diff)
downloadart-d0e0d4c833b82ac2639de9dea6042ccb87fe37ed.tar.gz
art-d0e0d4c833b82ac2639de9dea6042ccb87fe37ed.tar.bz2
art-d0e0d4c833b82ac2639de9dea6042ccb87fe37ed.zip
Disable HomogeneousSpaceCompact for GSS collector
HomogeneousSpaceCompact is not suitable when GSS is forground collector. This will fix issue that device can not boot with GSS collecor. Change-Id: Iafdf431c207351571f41bbc9196dff02ba674ab4 Signed-off-by: Lin Zang <lin.zang@intel.com>
Diffstat (limited to 'runtime/parsed_options.cc')
-rw-r--r--runtime/parsed_options.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 3e6c86b7c9..1b992d5159 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -691,11 +691,16 @@ 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 not set, background collector type defaults to homogeneous compaction.
+ // If foreground is GSS, use GSS as background collector.
+ // If not low memory mode, semispace otherwise.
if (background_collector_type_ == gc::kCollectorTypeNone) {
- background_collector_type_ = low_memory_mode_ ?
- gc::kCollectorTypeSS : gc::kCollectorTypeHomogeneousSpaceCompact;
+ if (collector_type_ != gc::kCollectorTypeGSS) {
+ background_collector_type_ = low_memory_mode_ ?
+ gc::kCollectorTypeSS : gc::kCollectorTypeHomogeneousSpaceCompact;
+ } else {
+ background_collector_type_ = collector_type_;
+ }
}
// If a reference to the dalvik core.jar snuck in, replace it with
@@ -722,9 +727,6 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize
if (heap_growth_limit_ == 0) {
heap_growth_limit_ = heap_maximum_size_;
}
- if (background_collector_type_ == gc::kCollectorTypeNone) {
- background_collector_type_ = collector_type_;
- }
return true;
} // NOLINT(readability/fn_size)