Don't pre-allocate one OOME per thread.
There's no associated stack trace, so we can share one between all
threads, saving a little memory and thread start-up time. Speaking
of stack traces: dump the stack to the log at the point where we
realize we're not going to be able to throw an exception with a
stack, so the developer has _something_ to work with.
Change-Id: I2246d291855bd9b9ee13f2be5b1ce14f669e9410
diff --git a/src/utils.cc b/src/utils.cc
index 87c8704..084456d 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -958,7 +958,7 @@
os << prefix << "(unwind_backtrace_thread failed for thread " << tid << ")\n";
return;
} else if (frame_count == 0) {
- os << prefix << "(no native stack frames)\n";
+ os << prefix << "(no native stack frames for thread " << tid << ")\n";
return;
}