Fix -Xint and -Xusejit interaction
- don't allow interpret and jit compilation at the same time
- make sure we -Xsaveprofileinfo works with -Xint.
Bug: 27916886
(cherry picked from commit 6caaa84947d5d207cde511978db327d95226e3ce)
Change-Id: Id5e7731653b322c25329b031561cfe150eb66522
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 6f2ad5f..17b8a45 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1924,9 +1924,8 @@
void Runtime::CreateJit() {
CHECK(!IsAotCompiler());
- if (GetInstrumentation()->IsForcedInterpretOnly()) {
- // Don't create JIT if forced interpret only.
- return;
+ if (kIsDebugBuild && GetInstrumentation()->IsForcedInterpretOnly()) {
+ DCHECK(!jit_options_->UseJitCompilation());
}
std::string error_msg;
jit_.reset(jit::Jit::Create(jit_options_.get(), &error_msg));