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

Commit 40189b00 authored by Alec Mouri's avatar Alec Mouri
Browse files

Propagate hwc/gl frames missed to dumpsys.

It'll be useful when rerunning the tests for top use-cases, as we'd
expect GL comp to be more expensive on average.

Bug: 123958105
Test: dumpsys SurfaceFlinger
Change-Id: I04543efc5c687f7657b259bfbe5a5219f5a3807e
parent 81835988
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1588,6 +1588,14 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
                mTimeStats->incrementMissedFrames();
            }

            if (hwcFrameMissed) {
                mHwcFrameMissedCount++;
            }

            if (gpuFrameMissed) {
                mGpuFrameMissedCount++;
            }

            if (mUseSmart90ForVideo) {
                // This call is made each time SF wakes up and creates a new frame. It is part
                // of video detection feature.
@@ -4636,7 +4644,9 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co
    dumpStaticScreenStats(result);
    result.append("\n");

    StringAppendF(&result, "Missed frame count: %u\n\n", mFrameMissedCount.load());
    StringAppendF(&result, "Total missed frame count: %u\n", mFrameMissedCount.load());
    StringAppendF(&result, "HWC missed frame count: %u\n", mHwcFrameMissedCount.load());
    StringAppendF(&result, "GPU missed frame count: %u\n\n", mGpuFrameMissedCount.load());

    dumpBufferingStats(result);

+2 −0
Original line number Diff line number Diff line
@@ -1015,6 +1015,8 @@ private:
    std::shared_ptr<TimeStats> mTimeStats;
    bool mUseHwcVirtualDisplays = false;
    std::atomic<uint32_t> mFrameMissedCount{0};
    std::atomic<uint32_t> mHwcFrameMissedCount{0};
    std::atomic<uint32_t> mGpuFrameMissedCount{0};

    TransactionCompletedThread mTransactionCompletedThread;