diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-03-17 13:48:29 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-03-18 18:49:28 -0700 |
commit | 455f67c4cf0b4f04e117db3024fd189fa1c7dab9 (patch) | |
tree | 3f89fdc8ba9b31cc0205945410a75d63e2f25000 /runtime/native/dalvik_system_ZygoteHooks.cc | |
parent | 5747266d57445ecdd026a4705d62768faad09b01 (diff) | |
download | android_art-455f67c4cf0b4f04e117db3024fd189fa1c7dab9.tar.gz android_art-455f67c4cf0b4f04e117db3024fd189fa1c7dab9.tar.bz2 android_art-455f67c4cf0b4f04e117db3024fd189fa1c7dab9.zip |
Fix JIT options with late init
Previously we couldn't create the JIT since we didn't have any
JITOptions.
Bug: 19735273
Change-Id: I24b8ed131ed8b18f75ec94291e135d8a1c089ebd
Diffstat (limited to 'runtime/native/dalvik_system_ZygoteHooks.cc')
-rw-r--r-- | runtime/native/dalvik_system_ZygoteHooks.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc index 8395150fb6..022c56fff1 100644 --- a/runtime/native/dalvik_system_ZygoteHooks.cc +++ b/runtime/native/dalvik_system_ZygoteHooks.cc @@ -21,6 +21,7 @@ #include "arch/instruction_set.h" #include "debugger.h" #include "java_vm_ext.h" +#include "jit/jit.h" #include "jni_internal.h" #include "JNIHelp.h" #include "ScopedUtfChars.h" @@ -94,18 +95,17 @@ static void EnableDebugFeatures(uint32_t debug_flags) { debug_flags &= ~DEBUG_ENABLE_SAFEMODE; } + bool use_jit = false; if ((debug_flags & DEBUG_ENABLE_JIT) != 0) { if (safe_mode) { - LOG(INFO) << "Not enabling JIT due to VM safe mode"; + LOG(INFO) << "Not enabling JIT due to safe mode"; } else { - if (runtime->GetJit() == nullptr) { - runtime->CreateJit(); - } else { - LOG(INFO) << "Not late-enabling JIT (already on)"; - } + use_jit = true; + LOG(INFO) << "Late-enabling JIT"; } debug_flags &= ~DEBUG_ENABLE_JIT; } + runtime->GetJITOptions()->SetUseJIT(use_jit); // This is for backwards compatibility with Dalvik. debug_flags &= ~DEBUG_ENABLE_ASSERT; |