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

Commit 6d84a1a6 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Log VRI draw events to event log

Add logs to help debug issues where window
visibility is concerned - such as anr and input
issues.

Test: adb logcat -b events | grep viewroot_draw_event
Bug: 318474796
Change-Id: I70dfc32b41029b1940e7fdafece83d9e42050762
parent fb14da9f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -59,5 +59,10 @@ option java_package android.view
# Enqueue Input Event
62002 view_enqueue_input_event (eventType|3),(action|3)

# following other view events defined in system/logging/logcat/event.logtags
# ViewRoot Draw Events
60004 viewroot_draw_event (window|3),(event|3)


# NOTE - the range 1000000-2000000 is reserved for partners and others who
# want to define their own log tags without conflicting with the core platform.
 No newline at end of file
+6 −8
Original line number Diff line number Diff line
@@ -286,6 +286,7 @@ public final class ViewRootImpl implements ViewParent,
    private static final boolean DEBUG_TOUCH_NAVIGATION = false || LOCAL_LOGV;
    private static final boolean DEBUG_BLAST = false || LOCAL_LOGV;
    private static final int LOGTAG_INPUT_FOCUS = 62001;
    private static final int LOGTAG_VIEWROOT_DRAW_EVENT = 60004;
    /**
     * Set to false if we do not want to use the multi threaded renderer even though
@@ -4750,13 +4751,7 @@ public final class ViewRootImpl implements ViewParent,
    }
    private void reportDrawFinished(@Nullable Transaction t, int seqId) {
        if (DEBUG_BLAST) {
            Log.d(mTag, "reportDrawFinished");
        }
        if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
            Trace.instant(Trace.TRACE_TAG_VIEW, "reportDrawFinished " + mTag + " seqId=" + seqId);
        }
        logAndTrace("reportDrawFinished seqId=" + seqId);
        try {
            mWindowSession.finishDrawing(mWindow, t, seqId);
        } catch (RemoteException e) {
@@ -12194,8 +12189,11 @@ public final class ViewRootImpl implements ViewParent,
        if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
            Trace.instant(Trace.TRACE_TAG_VIEW, mTag + "-" + msg);
        }
        if (DEBUG_BLAST) {
            Log.d(mTag, msg);
        }
        EventLog.writeEvent(LOGTAG_VIEWROOT_DRAW_EVENT, mTag, msg);
    }
    private void setPreferredFrameRateCategory(int preferredFrameRateCategory) {
        if (!shouldSetFrameRateCategory()) {