Disable jitzygote polling thread
Disable jitzygote polling thread until possible ANR issues are
resolved.
Bug: 139883463
Bug: 145973776
Test: adb shell setprop dalvik.vm.profilebootclasspath true
Test: adb shell setprop dalvik.vm.profilesystemserver true
Test: restart shell and verify no stability issues
Change-Id: Ia688c9c1df9fb1cc2777063641fd86171bbb181d
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index d94e600..285cfee 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -1636,7 +1636,10 @@
tasks_after_boot_.clear();
}
- if (Runtime::Current()->IsUsingApexBootImageLocation() && fd_methods_ != -1) {
+ // Disable polling thread until b/145973776 is fixed.
+ static constexpr bool kRunPollingThread = false;
+ Runtime* const runtime = Runtime::Current();
+ if (kRunPollingThread && runtime->IsUsingApexBootImageLocation() && fd_methods_ != -1) {
// Create a thread that will poll the status of zygote compilation, and map
// the private mapping of boot image methods.
zygote_mapping_methods_.ResetInForkedProcess();
@@ -1651,7 +1654,7 @@
"Methods maps thread");
}
- if (is_zygote || Runtime::Current()->IsSafeMode()) {
+ if (is_zygote || runtime->IsSafeMode()) {
// Delete the thread pool, we are not going to JIT.
thread_pool_.reset(nullptr);
return;