diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-03-25 13:54:29 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-03-25 13:54:29 -0700 |
commit | 703bc3a83056a878a83e263b992fb5331b84535f (patch) | |
tree | 314689a9bc53b284bacb1d257849d84de3ce7ff8 /src/com/android/providers/downloads/DownloadService.java | |
parent | 2c462097d100646ec7491b5fd5fa00ae7ff49200 (diff) | |
download | android_packages_providers_DownloadProvider-703bc3a83056a878a83e263b992fb5331b84535f.tar.gz android_packages_providers_DownloadProvider-703bc3a83056a878a83e263b992fb5331b84535f.tar.bz2 android_packages_providers_DownloadProvider-703bc3a83056a878a83e263b992fb5331b84535f.zip |
Reduce logging, dump stacks before wtf().
Most wtf() are looking like network timeouts, not threading bugs, so
disable verbose debugging and add more targeted thread logging before
calling wtf().
Bug: 8233041
Change-Id: I8e276bffd7880cfe13b65e7e81f5507cab627692
Diffstat (limited to 'src/com/android/providers/downloads/DownloadService.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadService.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java index 07641097..6c61193c 100644 --- a/src/com/android/providers/downloads/DownloadService.java +++ b/src/com/android/providers/downloads/DownloadService.java @@ -49,6 +49,7 @@ import com.google.common.collect.Sets; import java.io.File; import java.io.FileDescriptor; import java.io.PrintWriter; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -71,7 +72,7 @@ public class DownloadService extends Service { // TODO: migrate WakeLock from individual DownloadThreads out into // DownloadReceiver to protect our entire workflow. - private static final boolean DEBUG_LIFECYCLE = true; + private static final boolean DEBUG_LIFECYCLE = false; @VisibleForTesting SystemFacade mSystemFacade; @@ -237,6 +238,17 @@ public class DownloadService extends Service { } if (msg.what == MSG_FINAL_UPDATE) { + // Dump thread stacks belonging to pool + for (Map.Entry<Thread, StackTraceElement[]> entry : + Thread.getAllStackTraces().entrySet()) { + if (entry.getKey().getName().startsWith("pool")) { + Log.d(TAG, entry.getKey() + ": " + Arrays.toString(entry.getValue())); + } + } + + // Dump speed and update details + mNotifier.dumpSpeeds(); + Log.wtf(TAG, "Final update pass triggered, isActive=" + isActive + "; someone didn't update correctly."); } |