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

Commit 73917484 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "ActivityManagerService: Add Binder Proxy debug info to dump."

parents f8e748ec 2d6af37f
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -11115,6 +11115,11 @@ public class ActivityManagerService extends IActivityManager.Stub
                pw.println("-------------------------------------------------------------------------------");
            }
            mOomAdjProfiler.dump(pw);
            pw.println();
            if (dumpAll) {
                pw.println("-------------------------------------------------------------------------------");
            }
            dumpBinderProxies(pw);
        }
    }
@@ -11276,10 +11281,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++;
@@ -11674,7 +11676,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++) {
@@ -11702,6 +11705,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) {