Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2665ca95 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Switch remaining atrace calls to use sf specific macro

Flag: EXEMPT refactor
Bug: 349905670
Test: presubmit
Change-Id: Ifed012cbaf76dba434191eff426c1c79f8c9dfbd
parent ff206d6d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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()) {
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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());
    }
+1 −1
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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());
Loading