diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-11-14 18:27:24 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-11-14 18:27:24 -0800 |
commit | 8ec8d41aa691f901a58d28b89b1395f56bf1d1c3 (patch) | |
tree | 230edbf1128cb816d7e9b357d216c238d625bcee /services | |
parent | 6066a2b4de36549b7d8fe36507b7254e501f0b28 (diff) | |
download | frameworks_base-8ec8d41aa691f901a58d28b89b1395f56bf1d1c3.zip frameworks_base-8ec8d41aa691f901a58d28b89b1395f56bf1d1c3.tar.gz frameworks_base-8ec8d41aa691f901a58d28b89b1395f56bf1d1c3.tar.bz2 |
Improve low memory reporting.
Change-Id: I42d56ab8026fd02232dd11dbfbc513fbc0a1a851
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 34 | ||||
-rw-r--r-- | services/java/com/android/server/am/ContentProviderRecord.java | 4 |
2 files changed, 33 insertions, 5 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index cd63090..6b43710 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -1248,7 +1248,14 @@ public final class ActivityManagerService extends ActivityManagerNative PrintWriter pw = new PrintWriter(sw); StringWriter catSw = new StringWriter(); PrintWriter catPw = new PrintWriter(catSw); - dumpApplicationMemoryUsage(null, pw, " ", new String[] { }, true, catPw); + String[] emptyArgs = new String[] { }; + dumpApplicationMemoryUsage(null, pw, " ", emptyArgs, true, catPw); + pw.println(); + dumpProcessesLocked(null, pw, emptyArgs, 0, false); + pw.println(); + dumpServicesLocked(null, pw, emptyArgs, 0, false, false); + pw.println(); + dumpActivitiesLocked(null, pw, emptyArgs, 0, false, false); String memUsage = sw.toString(); dropBuilder.append('\n'); dropBuilder.append(memUsage); @@ -8789,6 +8796,20 @@ public final class ActivityManagerService extends ActivityManagerNative TimeUtils.formatDuration(r.createTime, nowReal, pw); pw.print(" started="); pw.print(r.startRequested); pw.print(" connections="); pw.println(r.connections.size()); + if (r.connections.size() > 0) { + pw.println(" Connections:"); + for (ArrayList<ConnectionRecord> clist : r.connections.values()) { + for (int i=0; i<clist.size(); i++) { + ConnectionRecord conn = clist.get(i); + pw.print(" "); + pw.print(conn.binding.intent.intent.getIntent().toShortString( + false, false, false)); + pw.print(" -> "); + ProcessRecord proc = conn.binding.client; + pw.println(proc != null ? proc.toShortString() : "null"); + } + } + } } if (dumpClient && r.app != null && r.app.thread != null) { pw.println(" Client:"); @@ -8908,18 +8929,21 @@ public final class ActivityManagerService extends ActivityManagerNative continue; } pw.print(" * "); pw.print(cls); pw.print(" ("); - pw.print(comp.flattenToShortString()); pw.print(")"); + pw.print(comp.flattenToShortString()); pw.println(")"); if (dumpAll) { - pw.println(); r.dump(pw, " "); } else { - pw.print(" * "); pw.print(e.getKey().flattenToShortString()); if (r.proc != null) { - pw.println(":"); pw.print(" "); pw.println(r.proc); } else { pw.println(); } + if (r.clients.size() > 0) { + pw.println(" Clients:"); + for (ProcessRecord cproc : r.clients) { + pw.print(" - "); pw.println(cproc); + } + } } } needSep = true; diff --git a/services/java/com/android/server/am/ContentProviderRecord.java b/services/java/com/android/server/am/ContentProviderRecord.java index 9c55597..6f6266d 100644 --- a/services/java/com/android/server/am/ContentProviderRecord.java +++ b/services/java/com/android/server/am/ContentProviderRecord.java @@ -74,6 +74,10 @@ class ContentProviderRecord extends ContentProviderHolder { pw.print(" initOrder="); pw.println(info.initOrder); } if (clients.size() > 0) { + pw.print(prefix); pw.println("Clients:"); + for (ProcessRecord cproc : clients) { + pw.print(prefix); pw.println(" - "); pw.println(cproc); + } pw.print(prefix); pw.print("clients="); pw.println(clients); } if (externals != 0) { |