diff options
author | 2023-12-15 18:17:05 +0000 | |
---|---|---|
committer | 2023-12-18 09:08:29 +0000 | |
commit | 4a0b8f1c9e4890c2c048ea2478b343086cf2f75b (patch) | |
tree | 5e02d0706b4dfc8a99079001728e72923d69b649 /runtime/class_linker.cc | |
parent | 20bcfc03bb7fc254dbeecb89117ab3453fda561e (diff) |
Revert "Remove the extra compilation sets in the JIT."
This reverts commit e39ccf2ea19ca241b7f1dbd9761db696f2055e29.
Reason for revert: Issues during class unloading
Change-Id: I6621ea1c4aa3d01bc0aae7a22b0b8105d61821a3
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 55c8912ce0..6916dec58d 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -2405,10 +2405,6 @@ void ClassLinker::VisitClassRoots(RootVisitor* visitor, VisitRootFlags flags) { // enabling tracing requires the mutator lock, there are no race conditions here. const bool tracing_enabled = Trace::IsTracingEnabled(); Thread* const self = Thread::Current(); - // For simplicity, if there is JIT activity, we'll trace all class loaders. - // This prevents class unloading while a method is being compiled or is going - // to be compiled. - const bool is_jit_active = jit::Jit::IsActive(self); WriterMutexLock mu(self, *Locks::classlinker_classes_lock_); if (gUseReadBarrier) { // We do not track new roots for CC. @@ -2439,8 +2435,8 @@ void ClassLinker::VisitClassRoots(RootVisitor* visitor, VisitRootFlags flags) { // these objects. UnbufferedRootVisitor root_visitor(visitor, RootInfo(kRootStickyClass)); boot_class_table_->VisitRoots(root_visitor); - // If tracing is enabled or jit is active, mark all the class loaders to prevent unloading. - if ((flags & kVisitRootFlagClassLoader) != 0 || tracing_enabled || is_jit_active) { + // If tracing is enabled, then mark all the class loaders to prevent unloading. + if ((flags & kVisitRootFlagClassLoader) != 0 || tracing_enabled) { for (const ClassLoaderData& data : class_loaders_) { GcRoot<mirror::Object> root(GcRoot<mirror::Object>(self->DecodeJObject(data.weak_root))); root.VisitRootIfNonNull(visitor, RootInfo(kRootVMInternal)); |