Merge "surfaceflinger: Frame missed count added to dumpsys SF"
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 108c929..2878b28 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1466,6 +1466,7 @@
mPreviousPresentFence != Fence::NO_FENCE &&
(mPreviousPresentFence->getSignalTime() ==
Fence::SIGNAL_TIME_PENDING);
+ mFrameMissedCount += frameMissed;
ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
if (frameMissed) {
mTimeStats.incrementMissedFrames();
@@ -4341,6 +4342,8 @@
dumpStaticScreenStats(result);
result.append("\n");
+ result.appendFormat("Missed frame count: %u\n\n", mFrameMissedCount.load());
+
dumpBufferingStats(result);
/*
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 4bb86c5..962c1dc 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -840,6 +840,7 @@
LayerStats mLayerStats;
TimeStats& mTimeStats = TimeStats::getInstance();
bool mUseHwcVirtualDisplays = false;
+ std::atomic<uint32_t> mFrameMissedCount{0};
// Restrict layers to use two buffers in their bufferqueues.
bool mLayerTripleBufferingDisabled = false;