diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-11-15 15:01:14 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-11-15 16:12:30 -0800 |
commit | 7aa6d31240787da87bb06d4457fdf23e39c46f98 (patch) | |
tree | 309046e35f67438b25889af8c5a3e70c5de4bc62 /services | |
parent | b35a21f987b99cfe90f4c46e0a708703274b8f46 (diff) | |
download | frameworks_base-7aa6d31240787da87bb06d4457fdf23e39c46f98.zip frameworks_base-7aa6d31240787da87bb06d4457fdf23e39c46f98.tar.gz frameworks_base-7aa6d31240787da87bb06d4457fdf23e39c46f98.tar.bz2 |
Whoops, need to acquire lock.
Also increase time between reports to try to reduce the amount
of redundant spam we get.
Change-Id: Iedd7d743826fffa62ee431073cb7dfb49a00cea0
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index b6f1184..c0af2f6 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -1211,8 +1211,8 @@ public final class ActivityManagerService extends ActivityManagerNative } synchronized (ActivityManagerService.this) { long now = SystemClock.uptimeMillis(); - if (now < (mLastMemUsageReportTime+10000)) { - // Don't report more than every 10 seconds to somewhat + if (now < (mLastMemUsageReportTime+5*60*1000)) { + // Don't report more than every 5 minutes to somewhat // avoid spamming. return; } @@ -1250,12 +1250,14 @@ public final class ActivityManagerService extends ActivityManagerNative PrintWriter catPw = new PrintWriter(catSw); String[] emptyArgs = new String[] { }; StringBuilder tag = new StringBuilder(128); - dumpProcessesLocked(null, catPw, emptyArgs, 0, false); - catPw.println(); - dumpServicesLocked(null, catPw, emptyArgs, 0, false, false); - catPw.println(); - dumpActivitiesLocked(null, catPw, emptyArgs, 0, false, false); - catPw.println(); + synchronized (ActivityManagerService.this) { + dumpProcessesLocked(null, catPw, emptyArgs, 0, false); + catPw.println(); + dumpServicesLocked(null, catPw, emptyArgs, 0, false, false); + catPw.println(); + dumpActivitiesLocked(null, catPw, emptyArgs, 0, false, false); + catPw.println(); + } tag.append("Low on memory -- "); dumpApplicationMemoryUsage(null, pw, " ", emptyArgs, true, catPw, tag); String memUsage = sw.toString(); |