[sf] Add traces with log fatals
If we have to abort flinger, capture a transaction trace to
disk as well. This will help us understand what lead to the
unexpected state.
Test: presubmit
Bug: 238781169
Change-Id: I3ba9004ef8fc3cc2b9f7f431f9ceefafda858db7
diff --git a/services/surfaceflinger/FrontEnd/TransactionHandler.cpp b/services/surfaceflinger/FrontEnd/TransactionHandler.cpp
index ca7c3c2..d3d9509 100644
--- a/services/surfaceflinger/FrontEnd/TransactionHandler.cpp
+++ b/services/surfaceflinger/FrontEnd/TransactionHandler.cpp
@@ -22,6 +22,7 @@
#include <cutils/trace.h>
#include <utils/Log.h>
#include <utils/Trace.h>
+#include "FrontEnd/LayerLog.h"
#include "TransactionHandler.h"
@@ -87,8 +88,8 @@
}
auto it = mPendingTransactionQueues.find(flushState.queueWithUnsignaledBuffer);
- LOG_ALWAYS_FATAL_IF(it == mPendingTransactionQueues.end(),
- "Could not find queue with unsignaled buffer!");
+ LLOG_ALWAYS_FATAL_WITH_TRACE_IF(it == mPendingTransactionQueues.end(),
+ "Could not find queue with unsignaled buffer!");
auto& queue = it->second;
popTransactionFromPending(transactions, flushState, queue);