Skip to content
Snippets Groups Projects
Commit d20b0cef authored by Zhiyin Luo (罗植尹)'s avatar Zhiyin Luo (罗植尹) Committed by Calvin Huang
Browse files

Fix CtsIncidentHostTestCases for RVC AAOS emulator

Same failure in b/161656795, cherry pick the fix

Fix uninitialization issue in JankTracker
We should initialize mSwapDeadline in JankTracker, or it can be a very
large randomized value and then makes jank tracker not collect concrete
jank type of frames appropriately as expected.

Bug: 158029827
Test: run cts -m CtsIncidentHostTestCases -t
   com.android.server.cts.GraphicsStatsValidationTest#testJankyDrawFrame
Change-Id: I057a50a74502918619204f9164f6a954f8e9c5de
(cherry picked from commit 7a0d2247)
(cherry picked from commit 69525945b9f63fe45e2e1cfa7f63320748a3fc25)
parent 82abf1c4
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,9 @@ void JankTracker::finishFrame(const FrameInfo& frame) {
(*mGlobalData)->reportJank();
}
if (mSwapDeadline < 0) {
mSwapDeadline = frame[FrameInfoIndex::IntendedVsync] + mFrameInterval;
}
bool isTripleBuffered = (mSwapDeadline - frame[FrameInfoIndex::IntendedVsync]) > (mFrameInterval * 0.1);
mSwapDeadline = std::max(mSwapDeadline + mFrameInterval,
......
......@@ -75,7 +75,7 @@ private:
std::array<int64_t, NUM_BUCKETS> mThresholds;
int64_t mFrameInterval;
nsecs_t mSwapDeadline;
nsecs_t mSwapDeadline = -1;
// The amount of time we will erase from the total duration to account
// for SF vsync offsets with HWC2 blocking dequeueBuffers.
// (Vsync + mDequeueBlockTolerance) is the point at which we expect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment