From be3fba05e823f740f65b2679929347dc3dd282ad Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 6 Jul 2015 13:49:58 -0700 Subject: Adjust for pipeline stalls Bug: 20853441 Calculating duration that crosses the UI-RT sync point will now subtract out the time spent waiting in queue under the assumption that this time will be accounted for in the previous frame's metrics Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a --- libs/hwui/FrameInfoVisualizer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libs/hwui/FrameInfoVisualizer.cpp') diff --git a/libs/hwui/FrameInfoVisualizer.cpp b/libs/hwui/FrameInfoVisualizer.cpp index 7f9d9b9..b416615 100644 --- a/libs/hwui/FrameInfoVisualizer.cpp +++ b/libs/hwui/FrameInfoVisualizer.cpp @@ -189,7 +189,7 @@ void FrameInfoVisualizer::nextBarSegment(FrameInfoIndex start, FrameInfoIndex en // Set the bottom to the old top (build upwards) rect[ri + 3] = rect[ri + 1]; // Move the top up by the duration - rect[ri + 1] -= mVerticalUnit * duration(fi, start, end); + rect[ri + 1] -= mVerticalUnit * durationMS(fi, start, end); } } @@ -253,10 +253,10 @@ void FrameInfoVisualizer::dumpData(int fd) { } mLastFrameLogged = mFrameSource[i][FrameInfoIndex::IntendedVsync]; fprintf(file, "\t%3.2f\t%3.2f\t%3.2f\t%3.2f\n", - duration(i, FrameInfoIndex::IntendedVsync, FrameInfoIndex::SyncStart), - duration(i, FrameInfoIndex::SyncStart, FrameInfoIndex::IssueDrawCommandsStart), - duration(i, FrameInfoIndex::IssueDrawCommandsStart, FrameInfoIndex::SwapBuffers), - duration(i, FrameInfoIndex::SwapBuffers, FrameInfoIndex::FrameCompleted)); + durationMS(i, FrameInfoIndex::IntendedVsync, FrameInfoIndex::SyncStart), + durationMS(i, FrameInfoIndex::SyncStart, FrameInfoIndex::IssueDrawCommandsStart), + durationMS(i, FrameInfoIndex::IssueDrawCommandsStart, FrameInfoIndex::SwapBuffers), + durationMS(i, FrameInfoIndex::SwapBuffers, FrameInfoIndex::FrameCompleted)); } fflush(file); -- cgit v1.1