ART: Speed up thread stack tracing for ANRs
Share a BacktraceMap for all threads being dumped, which speeds up
ANR dumping. Results from Nexus 9 (average of five):
Before: 0.587s
After: 0.206s
Change-Id: Ia70e0dbd39049318c02de561e7b95258d4849467
diff --git a/runtime/runtime_linux.cc b/runtime/runtime_linux.cc
index f0b3c4e..122dcb1 100644
--- a/runtime/runtime_linux.cc
+++ b/runtime/runtime_linux.cc
@@ -41,7 +41,7 @@
public:
explicit Backtrace(void* raw_context) : raw_context_(raw_context) {}
void Dump(std::ostream& os) const {
- DumpNativeStack(os, GetTid(), "\t", nullptr, raw_context_);
+ DumpNativeStack(os, GetTid(), nullptr, "\t", nullptr, raw_context_);
}
private:
// Stores the context of the signal that was unexpected and will terminate the runtime. The