diff options
| author | 2019-08-15 20:57:04 +0100 | |
|---|---|---|
| committer | 2019-08-16 13:30:31 +0000 | |
| commit | e9455f61f7e45963c7056b51dbaf8bb42c47454a (patch) | |
| tree | acc00224ae83a5b876cd92b45a5569d0e6232a98 /runtime/jit/jit.cc | |
| parent | 8fc2f95291206806599d4f2a50da529da85155b6 (diff) | |
Clear the boot task at fork.
Bug: 119800099
Test: boot, system server doesn't JIT boot classpath methods.
Change-Id: I83ba0f8f1c48c810856d333b3b355cae0a11f20f
Diffstat (limited to 'runtime/jit/jit.cc')
| -rw-r--r-- | runtime/jit/jit.cc | 5 |
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); |