Shut down FaultManager after shutting down threads.
Bug: 17703163
(cherry picked from commit 2beeb82523bd3b8015851b69ccd088553ec0c226)
Change-Id: Ic4beae99734ec15b8ead362fbf76a69eceae5980
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index bcb9e0c..9848382 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -172,9 +172,6 @@
BackgroundMethodSamplingProfiler::Shutdown();
}
- // Shutdown the fault manager if it was initialized.
- fault_manager.Shutdown();
-
Trace::Shutdown();
// Make sure to let the GC complete if it is running.
@@ -187,6 +184,10 @@
// Make sure all other non-daemon threads have terminated, and all daemon threads are suspended.
delete thread_list_;
+
+ // Shutdown the fault manager if it was initialized.
+ fault_manager.Shutdown();
+
delete monitor_list_;
delete monitor_pool_;
delete class_linker_;