diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-08-20 14:13:18 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-09-17 22:56:14 -0700 |
commit | 6b2352b41543a7d96f9c13b714781cedf504f766 (patch) | |
tree | 3903166bff1fe21eafb9a9d5704f4facc73a1209 /runtime/parsed_options.cc | |
parent | 6d24d4ff06a042ca1c716bea5acbca9733b3a96f (diff) | |
download | art-6b2352b41543a7d96f9c13b714781cedf504f766.tar.gz art-6b2352b41543a7d96f9c13b714781cedf504f766.tar.bz2 art-6b2352b41543a7d96f9c13b714781cedf504f766.zip |
Use homogeneous space compact by default if not low memory.
Otherwise we use semispace as the background collector.
Bug: 16401001
(cherry picked from commit a33a7fadadc7cb42c83b4aaed01f3a4c126d3075)
Change-Id: I6f753f72a05856f31a3e06427abce630231738a3
Diffstat (limited to 'runtime/parsed_options.cc')
-rw-r--r-- | runtime/parsed_options.cc | 8 |
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 |