Add option to force all code to be deoptimizable
Currently this can only be passed during runtime startup. We will add
support for doing it from the zygote in the future.
Bug: 28769520
Bug: 32369913
Test: m test-art-host
Change-Id: I5eb16887ea14b140217c123b3effd47c5c8b2768
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 6d849c4..6177ef9 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -239,6 +239,7 @@
force_native_bridge_(false),
is_native_bridge_loaded_(false),
is_native_debuggable_(false),
+ is_fully_deoptable_(false),
zygote_max_failed_boots_(0),
experimental_flags_(ExperimentalFlags::kNone),
oat_file_manager_(nullptr),
@@ -764,6 +765,9 @@
}
bool Runtime::IsDebuggable() const {
+ if (IsFullyDeoptable()) {
+ return true;
+ }
const OatFile* oat_file = GetOatFileManager().GetPrimaryOatFile();
return oat_file != nullptr && oat_file->IsDebuggable();
}
@@ -987,6 +991,8 @@
verify_ = runtime_options.GetOrDefault(Opt::Verify);
allow_dex_file_fallback_ = !runtime_options.Exists(Opt::NoDexFileFallback);
+ is_fully_deoptable_ = runtime_options.Exists(Opt::FullyDeoptable);
+
no_sig_chain_ = runtime_options.Exists(Opt::NoSigChain);
force_native_bridge_ = runtime_options.Exists(Opt::ForceNativeBridge);