summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2019-08-15 20:57:04 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2019-08-16 13:30:31 +0000
commite9455f61f7e45963c7056b51dbaf8bb42c47454a (patch)
treeacc00224ae83a5b876cd92b45a5569d0e6232a98
parent8fc2f95291206806599d4f2a50da529da85155b6 (diff)
Clear the boot task at fork.
Bug: 119800099 Test: boot, system server doesn't JIT boot classpath methods. Change-Id: I83ba0f8f1c48c810856d333b3b355cae0a11f20f
-rw-r--r--runtime/jit/jit.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index ad60546a9d..6964a20bdb 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -1115,6 +1115,11 @@ ScopedJitSuspend::~ScopedJitSuspend() {
}
void Jit::PostForkChildAction(bool is_system_server, bool is_zygote) {
+ // Clear the potential boot tasks inherited from the zygote.
+ {
+ MutexLock mu(Thread::Current(), boot_completed_lock_);
+ tasks_after_boot_.clear();
+ }
if (is_zygote || Runtime::Current()->IsSafeMode()) {
// Delete the thread pool, we are not going to JIT.
thread_pool_.reset(nullptr);