Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 975be521 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge "SF: add debug traces for latch unsignaled"

parents 9fb9a177 16f48f11
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -3677,6 +3677,7 @@ bool SurfaceFlinger::flushTransactionQueues(int64_t vsyncId) {
                auto& [applyToken, transactionQueue] = *it;
                while (!transactionQueue.empty()) {
                    if (stopTransactionProcessing(applyTokensWithUnsignaledTransactions)) {
                        ATRACE_NAME("stopTransactionProcessing");
                        break;
                    }

@@ -3688,6 +3689,7 @@ bool SurfaceFlinger::flushTransactionQueues(int64_t vsyncId) {
                                                          transaction.originUid, transaction.states,
                                                          bufferLayersReadyToPresent,
                                                          transactions.size());
                    ATRACE_INT("TransactionReadiness", static_cast<int>(ready));
                    if (ready == TransactionReadiness::NotReady) {
                        setTransactionFlags(eTransactionFlushNeeded);
                        break;
@@ -3725,6 +3727,7 @@ bool SurfaceFlinger::flushTransactionQueues(int64_t vsyncId) {
                const auto ready = [&]() REQUIRES(mStateLock) {
                    if (pendingTransactions ||
                        stopTransactionProcessing(applyTokensWithUnsignaledTransactions)) {
                        ATRACE_NAME("pendingTransactions || stopTransactionProcessing");
                        return TransactionReadiness::NotReady;
                    }

@@ -3735,7 +3738,7 @@ bool SurfaceFlinger::flushTransactionQueues(int64_t vsyncId) {
                                                         bufferLayersReadyToPresent,
                                                         transactions.size());
                }();

                ATRACE_INT("TransactionReadiness", static_cast<int>(ready));
                if (ready == TransactionReadiness::NotReady) {
                    mPendingTransactionQueues[transaction.applyToken].push(std::move(transaction));
                } else {
@@ -3896,11 +3899,10 @@ auto SurfaceFlinger::transactionIsReadyToBeApplied(
            continue;
        }

        ATRACE_NAME(layer->getName().c_str());

        const bool allowLatchUnsignaled =
                shouldLatchUnsignaled(layer, s, states.size(), totalTXapplied);
        ATRACE_INT("allowLatchUnsignaled", allowLatchUnsignaled);
        ATRACE_FORMAT("%s allowLatchUnsignaled=%s", layer->getName().c_str(),
                      allowLatchUnsignaled ? "true" : "false");

        const bool acquireFenceChanged = s.bufferData &&
                s.bufferData->flags.test(BufferData::BufferDataChange::fenceChanged) &&