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

Commit f05d13b0 authored by Lalit Maganti's avatar Lalit Maganti
Browse files

base: nest "receiver scheduled" slices under "process running" slices

As noted in b/259535570 and updated documentation for ag/20519869, we
now support nesting async slices. Since "receiver scheduled" slices
perfectly nest until "process running slices", it makes sense to use
the same cookie to allow parent <-> child relationships between
the two.

This does *not* change the UI/UX of traces in the Perfetto UI: it just
makes these slices much easier to query using SQL.

Bug: 259535570
Change-Id: Ie3a0f493ccd3a7f69e946e55486b2991b69c5ee3
parent 5a282451
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -506,15 +506,13 @@ class BroadcastProcessQueue {
    }

    public void traceActiveBegin() {
        final int cookie = mActive.receivers.get(mActiveIndex).hashCode();
        Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                runningTraceTrackName, mActive.toShortString() + " scheduled", cookie);
                runningTraceTrackName, mActive.toShortString() + " scheduled", hashCode());
    }

    public void traceActiveEnd() {
        final int cookie = mActive.receivers.get(mActiveIndex).hashCode();
        Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                runningTraceTrackName, cookie);
                runningTraceTrackName, hashCode());
    }

    /**