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

Commit 0ce0e084 authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue Committed by Android (Google) Code Review
Browse files

Merge "Enable binder txn tracing more broadly"

parents b84ff05e dd3be999
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1262,8 +1262,15 @@ public class Binder implements IBinder {
        // Log any exceptions as warnings, don't silently suppress them.
        // If the call was {@link IBinder#FLAG_ONEWAY} then these exceptions
        // disappear into the ether.
        final boolean tracingEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL) &&
                (Binder.isStackTrackingEnabled() || Binder.isTracingEnabled(callingUid));
        final boolean tagEnabled = Trace.isTagEnabled(Trace.TRACE_TAG_AIDL);
        final String transactionTraceName;
        if (tagEnabled) {
            transactionTraceName = getTransactionTraceName(code);
        } else {
            transactionTraceName = null;
        }

        final boolean tracingEnabled = tagEnabled && transactionTraceName != null;
        try {
            final BinderCallHeavyHitterWatcher heavyHitterWatcher = sHeavyHitterWatcher;
            if (heavyHitterWatcher != null) {
@@ -1271,7 +1278,7 @@ public class Binder implements IBinder {
                heavyHitterWatcher.onTransaction(callingUid, getClass(), code);
            }
            if (tracingEnabled) {
                Trace.traceBegin(Trace.TRACE_TAG_AIDL, getTransactionTraceName(code));
                Trace.traceBegin(Trace.TRACE_TAG_AIDL, transactionTraceName);
            }

            if ((flags & FLAG_COLLECT_NOTED_APP_OPS) != 0) {