summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2021-10-04 14:35:03 -0400
committer John Reck <jreck@google.com> 2021-10-04 14:37:09 -0400
commit00665ae1b0c8e500589252b5ece926a2d0c144a9 (patch)
tree1574886d6d9e1b1ec39ff1b9d9acc8b5728edfbd
parent8a5d660c41df6f76c8dc13f7c02f9a38c45a273e (diff)
Make JankTracker non-fatal
These asserts fire often enough to be a problem, but not often enough to be easily diagnosable or prioritized. Just make these ALOGV's instead, it's not that important Fixes: 200492526 Test: N/A Change-Id: I48eeb8e7aeada86bee449484a7c247760f5f613f
-rw-r--r--libs/hwui/JankTracker.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index 3e5cbb5fd758..1e5be6c3eed7 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -111,19 +111,22 @@ void JankTracker::calculateLegacyJank(FrameInfo& frame) REQUIRES(mDataMutex) {
// the actual time spent blocked.
nsecs_t forgiveAmount =
std::min(expectedDequeueDuration, frame[FrameInfoIndex::DequeueBufferDuration]);
- LOG_ALWAYS_FATAL_IF(forgiveAmount >= totalDuration,
- "Impossible dequeue duration! dequeue duration reported %" PRId64
- ", total duration %" PRId64,
- forgiveAmount, totalDuration);
+ if (forgiveAmount >= totalDuration) {
+ ALOGV("Impossible dequeue duration! dequeue duration reported %" PRId64
+ ", total duration %" PRId64,
+ forgiveAmount, totalDuration);
+ return;
+ }
totalDuration -= forgiveAmount;
}
}
- LOG_ALWAYS_FATAL_IF(totalDuration <= 0, "Impossible totalDuration %" PRId64 " start=%" PRIi64
- " gpuComplete=%" PRIi64, totalDuration,
- frame[FrameInfoIndex::IntendedVsync],
- frame[FrameInfoIndex::GpuCompleted]);
-
+ if (totalDuration <= 0) {
+ ALOGV("Impossible totalDuration %" PRId64 " start=%" PRIi64 " gpuComplete=%" PRIi64,
+ totalDuration, frame[FrameInfoIndex::IntendedVsync],
+ frame[FrameInfoIndex::GpuCompleted]);
+ return;
+ }
// Only things like Surface.lockHardwareCanvas() are exempt from tracking
if (CC_UNLIKELY(frame[FrameInfoIndex::Flags] & EXEMPT_FRAMES_FLAGS)) {
@@ -174,7 +177,10 @@ void JankTracker::finishFrame(FrameInfo& frame, std::unique_ptr<FrameMetricsRepo
int64_t totalDuration = frame.duration(FrameInfoIndex::IntendedVsync,
FrameInfoIndex::FrameCompleted);
- LOG_ALWAYS_FATAL_IF(totalDuration <= 0, "Impossible totalDuration %" PRId64, totalDuration);
+ if (totalDuration <= 0) {
+ ALOGV("Impossible totalDuration %" PRId64, totalDuration);
+ return;
+ }
mData->reportFrame(totalDuration);
(*mGlobalData)->reportFrame(totalDuration);