Add tracepoint for OutOfMemoryError
This will enable easily searching traces for OOMs and contextualize the problem.
Test: manual
Bug: 218534833
Change-Id: Ia7d3e4b1200debdce095208dbd6b22ea67f14e1e
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 0a3c09a..9505007 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -3460,6 +3460,7 @@
<< '"' << msg << '"'
<< " (VmSize " << GetProcessStatus("VmSize")
<< (tls32_.throwing_OutOfMemoryError ? ", recursive case)" : ")");
+ ScopedTrace trace("OutOfMemoryError");
if (!tls32_.throwing_OutOfMemoryError) {
tls32_.throwing_OutOfMemoryError = true;
ThrowNewException("Ljava/lang/OutOfMemoryError;", msg);