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

Commit 2d6af37f authored by Martijn Coenen's avatar Martijn Coenen
Browse files

ActivityManagerService: Add Binder Proxy debug info to dump.

Making it easier to analyze issues with these in bugreports.

Bug: 109888955
Test: dumpsys activity output looks sane
Change-Id: I96c0ec2e9980fcf1a13bab3af49ec607fb558f31
parent 69a30f68
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -12375,6 +12375,11 @@ public class ActivityManagerService extends IActivityManager.Stub
                pw.println("-------------------------------------------------------------------------------");
            }
            mOomAdjProfiler.dump(pw);
            pw.println();
            if (dumpAll) {
                pw.println("-------------------------------------------------------------------------------");
            }
            dumpBinderProxies(pw);
        }
    }
@@ -12536,10 +12541,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                }
            } else if ("binder-proxies".equals(cmd)) {
                if (opti >= args.length) {
                    dumpBinderProxyInterfaceCounts(pw,
                            "Top proxy interface names held by SYSTEM");
                    dumpBinderProxiesCounts(pw, BinderInternal.nGetBinderProxyPerUidCounts(),
                            "Number of proxies per uid held by SYSTEM");
                    dumpBinderProxies(pw);
                } else {
                    String uid = args[opti];
                    opti++;
@@ -12934,7 +12936,8 @@ public class ActivityManagerService extends IActivityManager.Stub
        }
    }
    boolean dumpBinderProxiesCounts(PrintWriter pw, SparseIntArray counts, String header) {
    boolean dumpBinderProxiesCounts(PrintWriter pw, String header) {
        SparseIntArray counts = BinderInternal.nGetBinderProxyPerUidCounts();
        if(counts != null) {
            pw.println(header);
            for (int i = 0; i < counts.size(); i++) {
@@ -12962,6 +12965,13 @@ public class ActivityManagerService extends IActivityManager.Stub
        return false;
    }
    void dumpBinderProxies(PrintWriter pw) {
        dumpBinderProxyInterfaceCounts(pw,
                "Top proxy interface names held by SYSTEM");
        dumpBinderProxiesCounts(pw,
                "Counts of Binder Proxies held by SYSTEM");
    }
    @GuardedBy("this")
    void dumpProcessesLocked(FileDescriptor fd, PrintWriter pw, String[] args,
            int opti, boolean dumpAll, String dumpPackage, int dumpAppId) {