summaryrefslogtreecommitdiffstats
path: root/dex2oat
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-03-20 14:48:13 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-03-20 14:51:15 +0000
commit1412dfa4adcd511902e510fa0c948b168ab5840c (patch)
tree3301c7a9c55c3627cba29e14f4bce44d9de31da3 /dex2oat
parent39374ce1df34164e0060b0621be98d33ba0ff4e6 (diff)
downloadart-1412dfa4adcd511902e510fa0c948b168ab5840c.zip
art-1412dfa4adcd511902e510fa0c948b168ab5840c.tar.gz
art-1412dfa4adcd511902e510fa0c948b168ab5840c.tar.bz2
Revert "Revert "Use optimizing for apps.""
This reverts commit 706cae36209932f258b2fe2e396f31d2dd7d585e. Change-Id: I75cc6206ec17ade52a6db0737b62aa37ea2fa300
Diffstat (limited to 'dex2oat')
-rw-r--r--dex2oat/dex2oat.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index bb80a70..a372179 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -494,6 +494,7 @@ class Dex2Oat FINAL {
bool watch_dog_enabled = true;
bool generate_gdb_information = kIsDebugBuild;
bool abort_on_hard_verifier_error = false;
+ bool requested_specific_compiler = false;
PassManagerOptions pass_manager_options;
@@ -603,6 +604,7 @@ class Dex2Oat FINAL {
Usage("Error parsing '%s': %s", option.data(), error_msg.c_str());
}
} else if (option.starts_with("--compiler-backend=")) {
+ requested_specific_compiler = true;
StringPiece backend_str = option.substr(strlen("--compiler-backend=")).data();
if (backend_str == "Quick") {
compiler_kind_ = Compiler::kQuick;
@@ -612,6 +614,7 @@ class Dex2Oat FINAL {
Usage("Unknown compiler backend: %s", backend_str.data());
}
} else if (option.starts_with("--compiler-filter=")) {
+ requested_specific_compiler = true;
compiler_filter_string = option.substr(strlen("--compiler-filter=")).data();
} else if (option == "--compile-pic") {
compile_pic = true;
@@ -741,6 +744,13 @@ class Dex2Oat FINAL {
}
}
+ image_ = (!image_filename_.empty());
+ if (!requested_specific_compiler && !kUseOptimizingCompiler) {
+ // If no specific compiler is requested, the current behavior is
+ // to compile the boot image with Quick, and the rest with Optimizing.
+ compiler_kind_ = image_ ? Compiler::kQuick : Compiler::kOptimizing;
+ }
+
if (compiler_kind_ == Compiler::kOptimizing) {
// Optimizing only supports PIC mode.
compile_pic = true;
@@ -774,7 +784,6 @@ class Dex2Oat FINAL {
android_root_ += android_root_env_var;
}
- image_ = (!image_filename_.empty());
if (!image_ && boot_image_filename.empty()) {
boot_image_filename += android_root_;
boot_image_filename += "/framework/boot.art";