summaryrefslogtreecommitdiff
path: root/libs/gui/BLASTBufferQueue.cpp
diff options
context:
space:
mode:
author Chavi Weingarten <chaviw@google.com> 2022-07-14 15:59:20 +0000
committer Chavi Weingarten <chaviw@google.com> 2022-07-14 16:02:25 +0000
commitd00e0f76caeee54b436355fe2d1412e30a1f3c83 (patch)
tree8e8f628ddb592c2dc20157ddcd6e5a270188f01a /libs/gui/BLASTBufferQueue.cpp
parent69e60a86c9e142d3cf6101ee70e26a9d90b2fdcc (diff)
Added trace data for latch and release buffers
It's helpful to see the specific layer and frame number that is being latched and released in SF to ensure we can trace where buffers go. Additionally, added new traces to BBQ where it could be flushing buffers or waiting until there's a free buffer Test: perfetto trace Bug: 238328090 Change-Id: I88fa6db62092438ed7ada12c3f0740dc3ac282d5
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
-rw-r--r--libs/gui/BLASTBufferQueue.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index 2212e58e4d..3bf2e195c5 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -599,6 +599,7 @@ Rect BLASTBufferQueue::computeCrop(const BufferItem& item) {
}
void BLASTBufferQueue::acquireAndReleaseBuffer() {
+ BBQ_TRACE();
BufferItem bufferItem;
status_t status =
mBufferItemConsumer->acquireBuffer(&bufferItem, 0 /* expectedPresent */, false);
@@ -612,6 +613,7 @@ void BLASTBufferQueue::acquireAndReleaseBuffer() {
}
void BLASTBufferQueue::flushAndWaitForFreeBuffer(std::unique_lock<std::mutex>& lock) {
+ BBQ_TRACE();
if (!mSyncedFrameNumbers.empty() && mNumFrameAvailable > 0) {
// We are waiting on a previous sync's transaction callback so allow another sync
// transaction to proceed.
@@ -642,8 +644,8 @@ void BLASTBufferQueue::onFrameAvailable(const BufferItem& item) {
bool waitForTransactionCallback = !mSyncedFrameNumbers.empty();
{
- BBQ_TRACE();
std::unique_lock _lock{mMutex};
+ BBQ_TRACE();
const bool syncTransactionSet = mTransactionReadyCallback != nullptr;
BQA_LOGV("onFrameAvailable-start syncTransactionSet=%s", boolToString(syncTransactionSet));