diff options
author | Ian Rogers <irogers@google.com> | 2014-05-09 16:57:40 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-12 15:18:23 -0700 |
commit | b9beb2e2efb6a204a69ca660d478b45f851e8f09 (patch) | |
tree | 168765e73d342712800566b562fb5276f63e49ef | |
parent | 6393eb7043517c5744935c48e3fd45a482915c2b (diff) | |
download | art-b9beb2e2efb6a204a69ca660d478b45f851e8f09.zip art-b9beb2e2efb6a204a69ca660d478b45f851e8f09.tar.gz art-b9beb2e2efb6a204a69ca660d478b45f851e8f09.tar.bz2 |
Place ISA into boot image name.
Depends upon:
https://android-review.googlesource.com/94078
Change-Id: I22c18b03b2c0db7a3f792920064e7710363b58b4
-rw-r--r-- | dex2oat/dex2oat.cc | 6 | ||||
-rw-r--r-- | oatdump/oatdump.cc | 2 | ||||
-rw-r--r-- | runtime/gc/space/image_space.cc | 4 | ||||
-rw-r--r-- | runtime/image.h | 2 | ||||
-rw-r--r-- | runtime/parsed_options.cc | 4 | ||||
-rw-r--r-- | runtime/runtime.cc | 14 |
6 files changed, 14 insertions, 18 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 3529c27..e90006e 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -764,7 +764,7 @@ static int dex2oat(int argc, char** argv) { for (int i = 0; i < argc; i++) { const StringPiece option(argv[i]); - bool log_options = false; + const bool log_options = false; if (log_options) { LOG(INFO) << "dex2oat: option[" << i << "]=" << argv[i]; } @@ -957,7 +957,9 @@ static int dex2oat(int argc, char** argv) { bool image = (!image_filename.empty()); if (!image && boot_image_filename.empty()) { boot_image_filename += GetAndroidRoot(); - boot_image_filename += "/framework/boot.art"; + boot_image_filename += "/framework/boot-"; + boot_image_filename += GetInstructionSetString(instruction_set); + boot_image_filename += ".art"; } std::string boot_image_option; if (!boot_image_filename.empty()) { diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 412a052..fc60c02 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -1548,7 +1548,7 @@ static int oatdump(int argc, char** argv) { } UniquePtr<Runtime> runtime(Runtime::Current()); // Runtime::Create acquired the mutator_lock_ that is normally given away when we Runtime::Start, - // give it away now and then switch to a more managable ScopedObjectAccess. + // give it away now and then switch to a more manageable ScopedObjectAccess. Thread::Current()->TransitionFromRunnableToSuspended(kNative); ScopedObjectAccess soa(Thread::Current()); gc::Heap* heap = Runtime::Current()->GetHeap(); diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index 858582e..a7795e6 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -144,8 +144,8 @@ ImageSpace* ImageSpace::Create(const char* image_location, std::string error_msg; bool is_system = false; if (FindImageFilename(image_location, image_isa, &image_filename, &is_system)) { - ImageSpace* space = ImageSpace::Init(image_filename.c_str(), image_location, - !is_system, &error_msg); + ImageSpace* space = ImageSpace::Init(image_filename.c_str(), image_location, !is_system, + &error_msg); if (space != nullptr) { return space; } diff --git a/runtime/image.h b/runtime/image.h index ce2bc58..abe1ad8 100644 --- a/runtime/image.h +++ b/runtime/image.h @@ -91,7 +91,7 @@ class PACKED(4) ImageHeader { static std::string GetOatLocationFromImageLocation(const std::string& image) { std::string oat_filename = image; if (oat_filename.length() <= 3) { - return oat_filename + ".oat"; + oat_filename += ".oat"; } else { oat_filename.replace(oat_filename.length() - 3, 3, "oat"); } diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index 84ca23b..a0ef76c 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -674,7 +674,9 @@ bool ParsedOptions::Parse(const Runtime::Options& options, bool ignore_unrecogni if (compiler_callbacks_ == nullptr && image_.empty()) { image_ += GetAndroidRoot(); - image_ += "/framework/boot.art"; + image_ += "/framework/boot-"; + image_ += GetInstructionSetString(image_isa_); + image_ += ".art"; } if (heap_growth_limit_ == 0) { heap_growth_limit_ = heap_maximum_size_; diff --git a/runtime/runtime.cc b/runtime/runtime.cc index d78be92..fa526fe 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1272,17 +1272,9 @@ void Runtime::AddCurrentRuntimeFeaturesAsDex2OatArguments(std::vector<std::strin // Make the dex2oat instruction set match that of the launching runtime. If we have multiple // architecture support, dex2oat may be compiled as a different instruction-set than that // currently being executed. -#if defined(__arm__) - argv->push_back("--instruction-set=arm"); -#elif defined(__aarch64__) - argv->push_back("--instruction-set=arm64"); -#elif defined(__i386__) - argv->push_back("--instruction-set=x86"); -#elif defined(__x86_64__) - argv->push_back("--instruction-set=x86_64"); -#elif defined(__mips__) - argv->push_back("--instruction-set=mips"); -#endif + std::string instruction_set("--instruction-set="); + instruction_set += GetInstructionSetString(kRuntimeISA); + argv->push_back(instruction_set); std::string features("--instruction-set-features="); features += GetDefaultInstructionSetFeatures(); |