summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/dex/art_dex_file_loader.cc13
-rw-r--r--runtime/dex/art_dex_file_loader.h3
-rw-r--r--runtime/oat_file_assistant.cc15
-rw-r--r--runtime/oat_file_assistant.h3
-rw-r--r--runtime/parsed_options.cc2
-rw-r--r--runtime/runtime.cc5
-rw-r--r--runtime/runtime_options.def2
7 files changed, 3 insertions, 40 deletions
diff --git a/runtime/dex/art_dex_file_loader.cc b/runtime/dex/art_dex_file_loader.cc
index c456764834..14386a3423 100644
--- a/runtime/dex/art_dex_file_loader.cc
+++ b/runtime/dex/art_dex_file_loader.cc
@@ -85,8 +85,7 @@ static constexpr OatDexFile* kNoOatDexFile = nullptr;
bool ArtDexFileLoader::GetMultiDexChecksums(const char* filename,
std::vector<uint32_t>* checksums,
std::string* error_msg,
- int zip_fd,
- bool* zip_file_only_contains_uncompressed_dex) const {
+ int zip_fd) const {
CHECK(checksums != nullptr);
uint32_t magic;
@@ -120,17 +119,7 @@ bool ArtDexFileLoader::GetMultiDexChecksums(const char* filename,
return false;
}
- if (zip_file_only_contains_uncompressed_dex != nullptr) {
- // Start by assuming everything is uncompressed.
- *zip_file_only_contains_uncompressed_dex = true;
- }
-
do {
- if (zip_file_only_contains_uncompressed_dex != nullptr) {
- if (!(zip_entry->IsUncompressed() && zip_entry->IsAlignedToDexHeader())) {
- *zip_file_only_contains_uncompressed_dex = false;
- }
- }
checksums->push_back(zip_entry->GetCrc32());
zip_entry_name = GetMultiDexClassesDexName(i++);
zip_entry.reset(zip_archive->Find(zip_entry_name.c_str(), error_msg));
diff --git a/runtime/dex/art_dex_file_loader.h b/runtime/dex/art_dex_file_loader.h
index 7c7a59b37f..3585381f9b 100644
--- a/runtime/dex/art_dex_file_loader.h
+++ b/runtime/dex/art_dex_file_loader.h
@@ -50,8 +50,7 @@ class ArtDexFileLoader : public DexFileLoader {
bool GetMultiDexChecksums(const char* filename,
std::vector<uint32_t>* checksums,
std::string* error_msg,
- int zip_fd = -1,
- bool* only_contains_uncompressed_dex = nullptr) const OVERRIDE;
+ int zip_fd = -1) const OVERRIDE;
// Opens .dex file, backed by existing memory
std::unique_ptr<const DexFile> Open(const uint8_t* base,
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 6bf05b77a8..0170073e29 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -515,18 +515,6 @@ OatFileAssistant::OatStatus OatFileAssistant::GivenOatFileStatus(const OatFile&
VLOG(oat) << "Image checksum test skipped for compiler filter " << current_compiler_filter;
}
- // zip_file_only_contains_uncompressed_dex_ is only set during fetching the dex checksums.
- DCHECK(required_dex_checksums_attempted_);
- if (only_load_system_executable_ &&
- !LocationIsOnSystem(file.GetLocation().c_str()) &&
- file.ContainsDexCode() &&
- zip_file_only_contains_uncompressed_dex_) {
- LOG(ERROR) << "Not loading "
- << dex_location_
- << ": oat file has dex code, but APK has uncompressed dex code";
- return kOatDexOutOfDate;
- }
-
if (CompilerFilter::IsAotCompilationEnabled(current_compiler_filter)) {
if (!file.IsPic()) {
const ImageInfo* image_info = GetImageInfo();
@@ -891,8 +879,7 @@ const std::vector<uint32_t>* OatFileAssistant::GetRequiredDexChecksums() {
if (dex_file_loader.GetMultiDexChecksums(dex_location_.c_str(),
&cached_required_dex_checksums_,
&error_msg,
- zip_fd_,
- &zip_file_only_contains_uncompressed_dex_)) {
+ zip_fd_)) {
required_dex_checksums_found_ = true;
has_original_dex_files_ = true;
} else {
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index 6da49a9c29..a184807b73 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -508,9 +508,6 @@ class OatFileAssistant {
// Whether only oat files on /system are loaded executable.
const bool only_load_system_executable_ = false;
- // Whether the potential zip file only contains uncompressed dex.
- // Will be set during GetRequiredDexChecksums.
- bool zip_file_only_contains_uncompressed_dex_ = true;
// Cached value of the required dex checksums.
// This should be accessed only by the GetRequiredDexChecksums() method.
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index c61ecc880b..c7f73d14db 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -334,8 +334,6 @@ std::unique_ptr<RuntimeParser> ParsedOptions::MakeParser(bool ignore_unrecognize
.IntoKey(M::HiddenApiChecks)
.Define("-Xuse-stderr-logger")
.IntoKey(M::UseStderrLogger)
- .Define("-Xonly-use-system-oat-files")
- .IntoKey(M::OnlyUseSystemOatFiles)
.Ignore({
"-ea", "-da", "-enableassertions", "-disableassertions", "--runtime-arg", "-esa",
"-dsa", "-enablesystemassertions", "-disablesystemassertions", "-Xrs", "-Xint:_",
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 4442fc6a54..2074f1e5f5 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1593,11 +1593,6 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) {
VLOG(startup) << "Runtime::Init exiting";
- // Set OnlyUseSystemOatFiles only after boot classpath has been set up.
- if (runtime_options.Exists(Opt::OnlyUseSystemOatFiles)) {
- oat_file_manager_->SetOnlyUseSystemOatFiles();
- }
-
return true;
}
diff --git a/runtime/runtime_options.def b/runtime/runtime_options.def
index 4121ad69ed..dba648e785 100644
--- a/runtime/runtime_options.def
+++ b/runtime/runtime_options.def
@@ -152,6 +152,4 @@ RUNTIME_OPTIONS_KEY (bool, SlowDebug, false)
RUNTIME_OPTIONS_KEY (unsigned int, GlobalRefAllocStackTraceLimit, 0) // 0 = off
RUNTIME_OPTIONS_KEY (Unit, UseStderrLogger)
-RUNTIME_OPTIONS_KEY (Unit, OnlyUseSystemOatFiles)
-
#undef RUNTIME_OPTIONS_KEY