diff options
-rw-r--r-- | runtime/gc/heap.cc | 5 | ||||
-rw-r--r-- | runtime/runtime.cc | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 83357990be..5c171e6f63 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -1422,11 +1422,6 @@ void Heap::Trim(Thread* self) { TrimSpaces(self); // Trim arenas that may have been used by JIT or verifier. runtime->GetArenaPool()->TrimMaps(); - { - // TODO: Move this to a callback called when startup is finished (b/120671223). - ScopedTrace trace2("Delete thread pool"); - runtime->DeleteThreadPool(); - } } class TrimIndirectReferenceTableClosure : public Closure { diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 6ab5d98dd4..55392052f7 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -2784,6 +2784,12 @@ void Runtime::NotifyStartupCompleted() { // Notify the profiler saver that startup is now completed. ProfileSaver::NotifyStartupCompleted(); + + { + // Delete the thread pool used for app image loading startup is completed. + ScopedTrace trace2("Delete thread pool"); + DeleteThreadPool(); + } } bool Runtime::GetStartupCompleted() const { |