diff options
| -rw-r--r-- | services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp | 4 | ||||
| -rw-r--r-- | services/surfaceflinger/DisplayHardware/PowerAdvisor.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/RefreshRateSelector.cpp | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/src/Timer.cpp | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 4 | ||||
| -rw-r--r-- | services/surfaceflinger/TracedOrdinal.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/common/include/common/trace.h | 4 |
10 files changed, 15 insertions, 11 deletions
diff --git a/services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp b/services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp index da56014530..334c104faf 100644 --- a/services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp +++ b/services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp @@ -211,7 +211,7 @@ void PowerAdvisor::sendHintSessionHint(SessionHint hint) { return; } SFTRACE_CALL(); - if (sTraceHintSessionData) ATRACE_INT("Session hint", static_cast<int>(hint)); + if (sTraceHintSessionData) SFTRACE_INT("Session hint", static_cast<int>(hint)); { std::scoped_lock lock(mHintSessionMutex); if (!ensurePowerHintSessionRunning()) { @@ -298,7 +298,7 @@ void PowerAdvisor::updateTargetWorkDuration(Duration targetDuration) { SFTRACE_CALL(); { mTargetDuration = targetDuration; - if (sTraceHintSessionData) ATRACE_INT64("Time target", targetDuration.ns()); + if (sTraceHintSessionData) SFTRACE_INT64("Time target", targetDuration.ns()); if (targetDuration == mLastTargetDurationSent) return; std::scoped_lock lock(mHintSessionMutex); if (!ensurePowerHintSessionRunning()) { diff --git a/services/surfaceflinger/DisplayHardware/PowerAdvisor.h b/services/surfaceflinger/DisplayHardware/PowerAdvisor.h index bc4a41bf84..1076b2b79b 100644 --- a/services/surfaceflinger/DisplayHardware/PowerAdvisor.h +++ b/services/surfaceflinger/DisplayHardware/PowerAdvisor.h @@ -300,7 +300,7 @@ private: bool mSessionConfigSupported = true; bool mFirstConfigSupportCheck = true; - // Whether we should emit ATRACE_INT data for hint sessions + // Whether we should emit SFTRACE_INT data for hint sessions static const bool sTraceHintSessionData; // Default target duration for the hint session diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 86c7d165e8..9a4a15374c 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -3238,7 +3238,7 @@ void Layer::recordLayerHistoryBufferUpdate(const scheduler::LayerProps& layerPro return static_cast<nsecs_t>(0); }(); - if (ATRACE_ENABLED() && presentTime > 0) { + if (SFTRACE_ENABLED() && presentTime > 0) { const auto presentIn = TimePoint::fromNs(presentTime) - TimePoint::now(); SFTRACE_FORMAT_INSTANT("presentIn %s", to_string(presentIn).c_str()); } diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index d3b56f89d1..52f169ebee 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -1265,7 +1265,7 @@ private: const std::string mBlastTransactionName{"BufferTX - " + mName}; // This integer is incremented everytime a buffer arrives at the server for this layer, // and decremented when a buffer is dropped or latched. When changed the integer is exported - // to systrace with ATRACE_INT and mBlastTransactionName. This way when debugging perf it is + // to systrace with SFTRACE_INT and mBlastTransactionName. This way when debugging perf it is // possible to see when a buffer arrived at the server, and in which frame it latched. // // You can understand the trace this way: diff --git a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp index 0b17c8495c..a20cf9a787 100644 --- a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp +++ b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp @@ -1065,7 +1065,7 @@ auto RefreshRateSelector::getFrameRateOverrides(const std::vector<LayerRequireme ALOGV("%s: overriding to %s for uid=%d", __func__, to_string(overrideFps).c_str(), uid); SFTRACE_FORMAT_INSTANT("%s: overriding to %s for uid=%d", __func__, to_string(overrideFps).c_str(), uid); - if (ATRACE_ENABLED() && FlagManager::getInstance().trace_frame_rate_override()) { + if (SFTRACE_ENABLED() && FlagManager::getInstance().trace_frame_rate_override()) { std::stringstream ss; ss << "FrameRateOverride " << uid; SFTRACE_INT(ss.str().c_str(), overrideFps.getIntValue()); diff --git a/services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp b/services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp index 8dae3ca0a3..900bce0aa9 100644 --- a/services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp +++ b/services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp @@ -45,7 +45,7 @@ ScheduleResult getExpectedCallbackTime(nsecs_t nextVsyncTime, } void traceEntry(const VSyncDispatchTimerQueueEntry& entry, nsecs_t now) { - if (!ATRACE_ENABLED() || !entry.wakeupTime().has_value() || !entry.targetVsync().has_value()) { + if (!SFTRACE_ENABLED() || !entry.wakeupTime().has_value() || !entry.targetVsync().has_value()) { return; } diff --git a/services/surfaceflinger/Scheduler/src/Timer.cpp b/services/surfaceflinger/Scheduler/src/Timer.cpp index fba3d58db5..20c58eb52f 100644 --- a/services/surfaceflinger/Scheduler/src/Timer.cpp +++ b/services/surfaceflinger/Scheduler/src/Timer.cpp @@ -188,7 +188,7 @@ bool Timer::dispatch() { int nfds = epoll_wait(mEpollFd, events, DispatchType::MAX_DISPATCH_TYPE, -1); setDebugState(DebugState::Running); - if (ATRACE_ENABLED()) { + if (SFTRACE_ENABLED()) { ftl::Concat trace("TimerIteration #", iteration++); SFTRACE_NAME(trace.c_str()); } diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index d00e762606..c25c7bc2a1 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -3320,9 +3320,9 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId, }); } - // Even though ATRACE_INT64 already checks if tracing is enabled, it doesn't prevent the + // Even though SFTRACE_INT64 already checks if tracing is enabled, it doesn't prevent the // side-effect of getTotalSize(), so we check that again here - if (ATRACE_ENABLED()) { + if (SFTRACE_ENABLED()) { // getTotalSize returns the total number of buffers that were allocated by SurfaceFlinger SFTRACE_INT64("Total Buffer Size", GraphicBufferAllocator::get().getTotalSize()); } diff --git a/services/surfaceflinger/TracedOrdinal.h b/services/surfaceflinger/TracedOrdinal.h index eba1ecf760..51f33a6988 100644 --- a/services/surfaceflinger/TracedOrdinal.h +++ b/services/surfaceflinger/TracedOrdinal.h @@ -79,7 +79,7 @@ public: private: void trace() { - if (CC_LIKELY(!ATRACE_ENABLED())) { + if (CC_LIKELY(!SFTRACE_ENABLED())) { return; } diff --git a/services/surfaceflinger/common/include/common/trace.h b/services/surfaceflinger/common/include/common/trace.h index c13cdde90d..344359ed7d 100644 --- a/services/surfaceflinger/common/include/common/trace.h +++ b/services/surfaceflinger/common/include/common/trace.h @@ -20,6 +20,10 @@ #include <cutils/trace.h> #include <stdint.h> +#ifndef ATRACE_TAG +#define ATRACE_TAG ATRACE_TAG_GRAPHICS +#endif + #define SFTRACE_ENABLED() ATRACE_ENABLED() #define SFTRACE_BEGIN(name) ATRACE_BEGIN(name) #define SFTRACE_END() ATRACE_END() |