ANR: Print backtraces before ART information
Prioritize the backtraces if the ANR is trimmed.
Bug: 189881220
Test: Manually trigger ANR and check output.
Change-Id: I1950c43d13e4daa8bbe9b5ac91774110aa2d4762
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index ac2bc54..6bb0049 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -2315,6 +2315,9 @@
}
void Runtime::DumpForSigQuit(std::ostream& os) {
+ // Print backtraces first since they are important do diagnose ANRs,
+ // and ANRs can often be trimmed to limit upload size.
+ thread_list_->DumpForSigQuit(os);
GetClassLinker()->DumpForSigQuit(os);
GetInternTable()->DumpForSigQuit(os);
GetJavaVM()->DumpForSigQuit(os);
@@ -2330,7 +2333,6 @@
GetMetrics()->DumpForSigQuit(os);
os << "\n";
- thread_list_->DumpForSigQuit(os);
BaseMutex::DumpAll(os);
// Inform anyone else who is interested in SigQuit.