Loading libs/hwui/JankTracker.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -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 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], 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)) { Loading Loading @@ -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); Loading Loading
libs/hwui/JankTracker.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -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 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], 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)) { Loading Loading @@ -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); Loading