summaryrefslogtreecommitdiff
path: root/libs/hwui/ProfileData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/ProfileData.cpp')
-rw-r--r--libs/hwui/ProfileData.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/hwui/ProfileData.cpp b/libs/hwui/ProfileData.cpp
index a8e36e37905d..dd8439647fd3 100644
--- a/libs/hwui/ProfileData.cpp
+++ b/libs/hwui/ProfileData.cpp
@@ -24,7 +24,8 @@ namespace uirenderer {
static const char* JANK_TYPE_NAMES[] = {
"Missed Vsync", "High input latency", "Slow UI thread",
- "Slow bitmap uploads", "Slow issue draw commands", "Frame deadline missed"};
+ "Slow bitmap uploads", "Slow issue draw commands", "Frame deadline missed",
+ "Frame deadline missed (legacy)"};
// The bucketing algorithm controls so to speak
// If a frame is <= to this it goes in bucket 0
@@ -94,6 +95,8 @@ void ProfileData::mergeWith(const ProfileData& other) {
}
mJankFrameCount >>= divider;
mJankFrameCount += other.mJankFrameCount;
+ mJankLegacyFrameCount >>= divider;
+ mJankLegacyFrameCount += other.mJankLegacyFrameCount;
mTotalFrameCount >>= divider;
mTotalFrameCount += other.mTotalFrameCount;
if (mStatStartTime > other.mStatStartTime || mStatStartTime == 0) {
@@ -112,6 +115,9 @@ void ProfileData::dump(int fd) const {
dprintf(fd, "\nJanky frames: %u (%.2f%%)", mJankFrameCount,
mTotalFrameCount == 0 ? 0.0f
: (float)mJankFrameCount / (float)mTotalFrameCount * 100.0f);
+ dprintf(fd, "\nJanky frames (legacy): %u (%.2f%%)", mJankLegacyFrameCount, mTotalFrameCount == 0
+ ? 0.0f
+ : (float)mJankLegacyFrameCount / (float)mTotalFrameCount * 100.0f);
dprintf(fd, "\n50th percentile: %ums", findPercentile(50));
dprintf(fd, "\n90th percentile: %ums", findPercentile(90));
dprintf(fd, "\n95th percentile: %ums", findPercentile(95));
@@ -158,6 +164,7 @@ void ProfileData::reset() {
mSlowFrameCounts.fill(0);
mTotalFrameCount = 0;
mJankFrameCount = 0;
+ mJankLegacyFrameCount = 0;
mStatStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
mPipelineType = Properties::getRenderPipelineType();
}