diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/gc/space/image_space.cc | 11 | ||||
| -rw-r--r-- | runtime/oat/oat.h | 2 | ||||
| -rw-r--r-- | runtime/oat/oat_file_assistant.cc | 14 | ||||
| -rw-r--r-- | runtime/runtime.cc | 6 | ||||
| -rw-r--r-- | runtime/runtime.h | 3 | ||||
| -rw-r--r-- | runtime/runtime_image.cc | 5 |
6 files changed, 1 insertions, 40 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index 18f4c4205a..d28a534440 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -65,7 +65,6 @@ #include "oat/oat_file.h" #include "profile/profile_compilation_info.h" #include "runtime.h" -#include "runtime_globals.h" #include "space-inl.h" namespace art HIDDEN { @@ -565,11 +564,6 @@ class ImageSpace::Loader { REQUIRES(!Locks::mutator_lock_) { TimingLogger logger(__PRETTY_FUNCTION__, /*precise=*/ true, VLOG_IS_ON(image)); - if (gPageSize != kMinPageSize) { - *error_msg = "Loading app image is only supported on devices with 4K page size"; - return nullptr; - } - std::unique_ptr<ImageSpace> space = Init(image_filename, image_location, &logger, @@ -3249,11 +3243,6 @@ bool ImageSpace::BootImageLoader::LoadFromSystem( /*out*/std::string* error_msg) { TimingLogger logger(__PRETTY_FUNCTION__, /*precise=*/ true, VLOG_IS_ON(image)); - if (gPageSize != kMinPageSize) { - *error_msg = "Loading boot image is only supported on devices with 4K page size"; - return false; - } - BootImageLayout layout(image_locations_, boot_class_path_, boot_class_path_locations_, diff --git a/runtime/oat/oat.h b/runtime/oat/oat.h index 2a8607844b..bfda96ec8e 100644 --- a/runtime/oat/oat.h +++ b/runtime/oat/oat.h @@ -44,7 +44,7 @@ std::ostream& operator<<(std::ostream& stream, StubType stub_type); class EXPORT PACKED(4) OatHeader { public: static constexpr std::array<uint8_t, 4> kOatMagic { { 'o', 'a', 't', '\n' } }; - // Last oat version changed reason: move dynamic sections to start of OAT file. + // Last oat version changed reason: Restore to 16 KB ELF alignment. static constexpr std::array<uint8_t, 4> kOatVersion{{'2', '5', '6', '\0'}}; static constexpr const char* kDex2OatCmdLineKey = "dex2oat-cmdline"; diff --git a/runtime/oat/oat_file_assistant.cc b/runtime/oat/oat_file_assistant.cc index 7ee65db1a5..151c3a6ca9 100644 --- a/runtime/oat/oat_file_assistant.cc +++ b/runtime/oat/oat_file_assistant.cc @@ -51,7 +51,6 @@ #include "oat.h" #include "oat_file_assistant_context.h" #include "runtime.h" -#include "runtime_globals.h" #include "scoped_thread_state_change-inl.h" #include "vdex_file.h" #include "zlib.h" @@ -1107,12 +1106,6 @@ const OatFile* OatFileAssistant::OatFileInfo::GetFile() { executable = LocationIsTrusted(filename_, /*trust_art_apex_data_files=*/true); } VLOG(oat) << "Loading " << filename_ << " with executable: " << executable; - - if (gPageSize != kMinPageSize) { - LOG(WARNING) << "Loading odex files is only supported on devices with 4K page size"; - return nullptr; - } - if (use_fd_) { if (oat_fd_ >= 0 && vdex_fd_ >= 0) { ArrayRef<const std::string> dex_locations(&oat_file_assistant_->dex_location_, @@ -1151,13 +1144,6 @@ bool OatFileAssistant::OatFileInfo::ShouldRecompileForFilter(CompilerFilter::Fil const OatFile* file = GetFile(); DCHECK(file != nullptr); - if (CompilerFilter::IsBetter(target, CompilerFilter::kVerify) && gPageSize != kMinPageSize) { - // Prevent infinite recompilations during background dexopt on 16K page devices. - VLOG(oat) << "Adjusting target filter to 'verify' because loading odex files is only supported " - "on devices with 4K page size"; - target = CompilerFilter::kVerify; - } - CompilerFilter::Filter current = file->GetCompilerFilter(); if (dexopt_trigger.targetFilterIsBetter && CompilerFilter::IsBetter(target, current)) { VLOG(oat) << ART_FORMAT("Should recompile: targetFilterIsBetter (current: {}, target: {})", diff --git a/runtime/runtime.cc b/runtime/runtime.cc index b43fa1ca5c..a16bde3469 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -3508,10 +3508,4 @@ void Runtime::DCheckNoTransactionCheckAllowed() { } } -NO_INLINE void Runtime::AllowPageSizeAccess() { -#ifdef ART_PAGE_SIZE_AGNOSTIC - gPageSize.AllowAccess(); -#endif -} - } // namespace art diff --git a/runtime/runtime.h b/runtime/runtime.h index 97eac64fa1..e43d1d3432 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -1134,9 +1134,6 @@ class Runtime { bool AreMetricsInitialized() const { return metrics_reporter_ != nullptr; } - // For `artd` only. - EXPORT static void AllowPageSizeAccess(); - private: static void InitPlatformSignalHandlers(); diff --git a/runtime/runtime_image.cc b/runtime/runtime_image.cc index 7bfefe5278..1d3007ad3a 100644 --- a/runtime/runtime_image.cc +++ b/runtime/runtime_image.cc @@ -1868,11 +1868,6 @@ static bool EnsureDirectoryExists(const std::string& directory, std::string* err } bool RuntimeImage::WriteImageToDisk(std::string* error_msg) { - if (gPageSize != kMinPageSize) { - *error_msg = "Writing runtime image is only supported on devices with 4K page size"; - return false; - } - gc::Heap* heap = Runtime::Current()->GetHeap(); if (!heap->HasBootImageSpace()) { *error_msg = "Cannot generate an app image without a boot image"; |