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

Commit 4e46539a authored by Liana Kazanova's avatar Liana Kazanova Committed by Android (Google) Code Review
Browse files

Revert "Reduce memory churn from main thread looper tracing"

This reverts commit 695483c7.

Reason for revert: Potential culprit for b/292104295 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted

Change-Id: I9f06f189190cd5e75118023e665c900658825c17
parent 695483c7
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.os.Message;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.TraceNameSupplier;
import android.util.Log;
import android.util.TimeUtils;
import android.view.animation.AnimationUtils;
@@ -1301,7 +1300,7 @@ public final class Choreographer {
    }

    private final class FrameDisplayEventReceiver extends DisplayEventReceiver
            implements Runnable, TraceNameSupplier {
            implements Runnable {
        private boolean mHavePendingVsync;
        private long mTimestampNanos;
        private int mFrame;
@@ -1359,14 +1358,6 @@ public final class Choreographer {
            mHavePendingVsync = false;
            doFrame(mTimestampNanos, mFrame, mLastVsyncEventData);
        }

        @androidx.annotation.NonNull
        @Override
        public String getTraceName() {
            // Returning just a simple name.
            // More detailed logging happens in onVsync() for TRACE_TAG_VIEW.
            return "FrameDisplayEventReceiver";
        }
    }

    private static final class CallbackRecord {
+0 −9
Original line number Diff line number Diff line
@@ -5787,15 +5787,6 @@ public final class ViewRootImpl implements ViewParent,
    private static final int MSG_PAUSED_FOR_SYNC_TIMEOUT = 37;

    final class ViewRootHandler extends Handler {
        @androidx.annotation.NonNull
        @Override
        public String getTraceName(@androidx.annotation.NonNull Message message) {
            if (message.getCallback() == null) {
                return getMessageName(message);
            }
            return super.getTraceName(message);
        }

        @Override
        public String getMessageName(Message message) {
            switch (message.what) {
+25 −25
Original line number Diff line number Diff line
@@ -502,10 +502,9 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
        return vsyncId >= mBeginVsyncId;
    }

    // This will be executed in the HardwareRendererObserver handler, which is the FrameTracker
    // handler by construction.
    @Override
    public void onFrameMetricsAvailable(int dropCountSinceLastInvocation) {
        postCallback(() -> {
            if (mCancelled || mMetricsFinalized) {
                return;
            }
@@ -531,6 +530,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
                        frameVsyncId, totalDurationNanos, isFirstFrame));
            }
            processJankInfos();
        });
    }

    @UiThread