diff options
| -rw-r--r-- | services/surfaceflinger/Scheduler/VsyncModulator.cpp | 29 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/VsyncModulator.h | 1 |
2 files changed, 13 insertions, 17 deletions
diff --git a/services/surfaceflinger/Scheduler/VsyncModulator.cpp b/services/surfaceflinger/Scheduler/VsyncModulator.cpp index fa377e9323..3c5f68c4c2 100644 --- a/services/surfaceflinger/Scheduler/VsyncModulator.cpp +++ b/services/surfaceflinger/Scheduler/VsyncModulator.cpp @@ -21,7 +21,6 @@ #include "VsyncModulator.h" -#include <android-base/properties.h> #include <common/trace.h> #include <log/log.h> @@ -37,8 +36,7 @@ const std::chrono::nanoseconds VsyncModulator::MIN_EARLY_TRANSACTION_TIME = 1ms; VsyncModulator::VsyncModulator(const VsyncConfigSet& config, Now now) : mVsyncConfigSet(config), - mNow(now), - mTraceDetailedInfo(base::GetBoolProperty("debug.sf.vsync_trace_detailed_info", false)) {} + mNow(now) {} VsyncConfig VsyncModulator::setVsyncConfigSet(const VsyncConfigSet& config) { std::lock_guard<std::mutex> lock(mMutex); @@ -71,10 +69,6 @@ VsyncModulator::VsyncConfigOpt VsyncModulator::setTransactionSchedule(Transactio break; } - if (mTraceDetailedInfo) { - SFTRACE_INT("mEarlyWakeup", static_cast<int>(mEarlyWakeupRequests.size())); - } - if (mEarlyWakeupRequests.empty() && schedule == Schedule::EarlyEnd) { mEarlyTransactionFrames = MIN_EARLY_TRANSACTION_FRAMES; mEarlyTransactionStartTime = mNow(); @@ -167,15 +161,19 @@ VsyncConfig VsyncModulator::updateVsyncConfigLocked() { const VsyncConfig& offsets = getNextVsyncConfig(); mVsyncConfig = offsets; - if (mTraceDetailedInfo) { - const bool isEarly = &offsets == &mVsyncConfigSet.early; - const bool isEarlyGpu = &offsets == &mVsyncConfigSet.earlyGpu; - const bool isLate = &offsets == &mVsyncConfigSet.late; + // Trace config type + SFTRACE_INT("Vsync-Early", &mVsyncConfig == &mVsyncConfigSet.early); + SFTRACE_INT("Vsync-EarlyGpu", &mVsyncConfig == &mVsyncConfigSet.earlyGpu); + SFTRACE_INT("Vsync-Late", &mVsyncConfig == &mVsyncConfigSet.late); - SFTRACE_INT("Vsync-EarlyOffsetsOn", isEarly); - SFTRACE_INT("Vsync-EarlyGpuOffsetsOn", isEarlyGpu); - SFTRACE_INT("Vsync-LateOffsetsOn", isLate); - } + // Trace early vsync conditions + SFTRACE_INT("EarlyWakeupRequests", + static_cast<int>(mEarlyWakeupRequests.size())); + SFTRACE_INT("EarlyTransactionFrames", mEarlyTransactionFrames); + SFTRACE_INT("RefreshRateChangePending", mRefreshRateChangePending); + + // Trace early gpu conditions + SFTRACE_INT("EarlyGpuFrames", mEarlyGpuFrames); return offsets; } @@ -183,7 +181,6 @@ VsyncConfig VsyncModulator::updateVsyncConfigLocked() { void VsyncModulator::binderDied(const wp<IBinder>& who) { std::lock_guard<std::mutex> lock(mMutex); mEarlyWakeupRequests.erase(who); - static_cast<void>(updateVsyncConfigLocked()); } diff --git a/services/surfaceflinger/Scheduler/VsyncModulator.h b/services/surfaceflinger/Scheduler/VsyncModulator.h index be0d3348b5..d0a793535c 100644 --- a/services/surfaceflinger/Scheduler/VsyncModulator.h +++ b/services/surfaceflinger/Scheduler/VsyncModulator.h @@ -105,7 +105,6 @@ private: std::atomic<TimePoint> mLastTransactionCommitTime = TimePoint(); const Now mNow; - const bool mTraceDetailedInfo; }; } // namespace android::scheduler |