diff options
-rw-r--r-- | runtime/oat_file_manager.cc | 2 | ||||
-rw-r--r-- | runtime/runtime.cc | 5 | ||||
-rw-r--r-- | runtime/runtime.h | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc index e4c7dc3081..687ec544e3 100644 --- a/runtime/oat_file_manager.cc +++ b/runtime/oat_file_manager.cc @@ -473,7 +473,7 @@ std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat( OatFileAssistant oat_file_assistant(dex_location, kRuntimeISA, - !runtime->IsAotCompiler(), + runtime->GetOatFilesExecutable(), only_use_system_oat_files_); // Get the oat file on disk. diff --git a/runtime/runtime.cc b/runtime/runtime.cc index b6b7501010..c6d9bfdf25 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -986,7 +986,6 @@ void Runtime::InitNonZygoteOrPostFork( UnloadNativeBridge(); is_native_bridge_loaded_ = false; break; - case NativeBridgeAction::kInitialize: InitializeNativeBridge(env, isa); break; @@ -2965,4 +2964,8 @@ void Runtime::SetJniIdType(JniIdType t) { WellKnownClasses::HandleJniIdTypeChange(Thread::Current()->GetJniEnv()); } +bool Runtime::GetOatFilesExecutable() const { + return !IsAotCompiler() && !(IsSystemServer() && jit_options_->GetSaveProfilingInfo()); +} + } // namespace art diff --git a/runtime/runtime.h b/runtime/runtime.h index 71eb7eae12..ac84d32b82 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -92,6 +92,7 @@ class InternTable; class IsMarkedVisitor; class JavaVMExt; class LinearAlloc; +class MethodInspectionCallback; class MonitorList; class MonitorPool; class NullPointerHandler; @@ -942,6 +943,9 @@ class Runtime { return verifier_missing_kthrow_fatal_; } + // Return true if we should load oat files as executable or not. + bool GetOatFilesExecutable() const; + private: static void InitPlatformSignalHandlers(); |