summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-08-21 23:38:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-21 23:38:52 +0000
commitee23f85dc66e651a1a220a612d3407689b8de5e8 (patch)
treecb6e257982a1f7d19ba99bff3a9132f3eb53f503 /runtime/runtime.cc
parentdd3413f4a1a4fcf9fd62b4660805a4ce64b22bd6 (diff)
parent2775ee4f82dff260663ca16adddc0b15327aaa42 (diff)
downloadart-ee23f85dc66e651a1a220a612d3407689b8de5e8.zip
art-ee23f85dc66e651a1a220a612d3407689b8de5e8.tar.gz
art-ee23f85dc66e651a1a220a612d3407689b8de5e8.tar.bz2
Merge "Add more runtime options." into dalvik-dev
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc33
1 files changed, 27 insertions, 6 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 65bd495..51a67c1 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -339,7 +339,9 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
parsed->heap_target_utilization_ = gc::Heap::kDefaultTargetUtilization;
parsed->heap_growth_limit_ = 0; // 0 means no growth limit.
// Default to number of processors minus one since the main GC thread also does work.
- parsed->heap_gc_threads_ = sysconf(_SC_NPROCESSORS_CONF) - 1;
+ parsed->parallel_gc_threads_ = sysconf(_SC_NPROCESSORS_CONF) - 1;
+ // Only the main GC thread, no workers.
+ parsed->conc_gc_threads_ = 0;
parsed->stack_size_ = 0; // 0 means default.
parsed->low_memory_mode_ = false;
@@ -349,6 +351,10 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
parsed->is_concurrent_gc_enabled_ = true;
parsed->is_explicit_gc_disabled_ = false;
+ parsed->long_pause_log_threshold_ = gc::Heap::kDefaultLongPauseLogThreshold;
+ parsed->long_gc_log_threshold_ = gc::Heap::kDefaultLongGCLogThreshold;
+ parsed->ignore_max_footprint_ = false;
+
parsed->lock_profiling_threshold_ = 0;
parsed->hook_is_sensitive_thread_ = NULL;
@@ -480,9 +486,12 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
return NULL;
}
parsed->heap_target_utilization_ = value;
- } else if (StartsWith(option, "-XX:HeapGCThreads=")) {
- parsed->heap_gc_threads_ =
- ParseMemoryOption(option.substr(strlen("-XX:HeapGCThreads=")).c_str(), 1024);
+ } else if (StartsWith(option, "-XX:ParallelGCThreads=")) {
+ parsed->parallel_gc_threads_ =
+ ParseMemoryOption(option.substr(strlen("-XX:ParallelGCThreads=")).c_str(), 1024);
+ } else if (StartsWith(option, "-XX:ConcGCThreads=")) {
+ parsed->conc_gc_threads_ =
+ ParseMemoryOption(option.substr(strlen("-XX:ConcGCThreads=")).c_str(), 1024);
} else if (StartsWith(option, "-Xss")) {
size_t size = ParseMemoryOption(option.substr(strlen("-Xss")).c_str(), 1);
if (size == 0) {
@@ -494,6 +503,14 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
return NULL;
}
parsed->stack_size_ = size;
+ } else if (option == "-XX:LongPauseLogThreshold") {
+ parsed->long_pause_log_threshold_ =
+ ParseMemoryOption(option.substr(strlen("-XX:LongPauseLogThreshold=")).c_str(), 1024);
+ } else if (option == "-XX:LongGCLogThreshold") {
+ parsed->long_gc_log_threshold_ =
+ ParseMemoryOption(option.substr(strlen("-XX:LongGCLogThreshold")).c_str(), 1024);
+ } else if (option == "-XX:IgnoreMaxFootprint") {
+ parsed->ignore_max_footprint_ = true;
} else if (option == "-XX:LowMemoryMode") {
parsed->low_memory_mode_ = true;
} else if (StartsWith(option, "-D")) {
@@ -865,8 +882,12 @@ bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
options->heap_maximum_size_,
options->image_,
options->is_concurrent_gc_enabled_,
- options->heap_gc_threads_,
- options->low_memory_mode_);
+ options->parallel_gc_threads_,
+ options->conc_gc_threads_,
+ options->low_memory_mode_,
+ options->long_pause_log_threshold_,
+ options->long_gc_log_threshold_,
+ options->ignore_max_footprint_);
BlockSignals();
InitPlatformSignalHandlers();