From 0d3c578a80a72d902963408908eda6fdeb7d6c8c Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 29 Apr 2016 16:42:22 -0700 Subject: [PATCH] Work on issue #28200735: AcitvityManagerService lock held for... ...300mS in bindService Make the "slow proc start" debugging more aggressive, so it will catch cases where it is taking more than 50ms to start. Change-Id: I6f6eb749cf205f9890946b3ec562b7653674c3d9 --- .../com/android/server/am/ActivityManagerService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 21a9f2c9735c9..7247aba1081f0 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -10295,9 +10295,9 @@ public final class ActivityManagerService extends ActivityManagerNative } private void checkTime(long startTime, String where) { - long now = SystemClock.elapsedRealtime(); - if ((now-startTime) > 1000) { - // If we are taking more than a second, log about it. + long now = SystemClock.uptimeMillis(); + if ((now-startTime) > 50) { + // If we are taking more than 50ms, log about it. Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where); } } @@ -10309,7 +10309,7 @@ public final class ActivityManagerService extends ActivityManagerNative ProviderInfo cpi = null; synchronized(this) { - long startTime = SystemClock.elapsedRealtime(); + long startTime = SystemClock.uptimeMillis(); ProcessRecord r = null; if (caller != null) {