diff options
Diffstat (limited to 'runtime/parsed_options.cc')
| -rw-r--r-- | runtime/parsed_options.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index efc4a7195b..4551d5b0e1 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -105,8 +105,15 @@ ParsedOptions::ParsedOptions() verify_(true), image_isa_(kRuntimeISA), use_homogeneous_space_compaction_for_oom_(true), // Enable hspace compaction on OOM by default. - min_interval_homogeneous_space_compaction_by_oom_(MsToNs(100 * 1000)) // 100s. - {} + min_interval_homogeneous_space_compaction_by_oom_(MsToNs(100 * 1000)) { // 100s. + if (kUseReadBarrier) { + // If RB is enabled (currently a build-time decision), use CC as the default GC. + collector_type_ = gc::kCollectorTypeCC; + background_collector_type_ = gc::kCollectorTypeCC; // Disable background compaction for CC. + interpreter_only_ = true; // Disable the compiler for CC (for now). + // use_tlab_ = true; + } +} ParsedOptions* ParsedOptions::Create(const RuntimeOptions& options, bool ignore_unrecognized) { std::unique_ptr<ParsedOptions> parsed(new ParsedOptions()); |