StrictMode: now in more system server threads.
Who knew there were so many Loopers in the system server? This adds dropbox logging for the activity manager thread, policy thread, and window manager thread. The goal's to catch more stuttering. Change-Id: I999a6ff4a955f0ef549b12a38796b843ade5fe66
This commit is contained in:
@@ -86,6 +86,7 @@ import android.os.PowerManager;
|
||||
import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.StrictMode;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.TokenWatcher;
|
||||
@@ -944,6 +945,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
// For debug builds, log event loop stalls to dropbox for analysis.
|
||||
if (StrictMode.conditionallyEnableDebugLogging()) {
|
||||
Slog.i(TAG, "Enabled StrictMode logging for WMThread's Looper");
|
||||
}
|
||||
|
||||
Looper.loop();
|
||||
}
|
||||
}
|
||||
@@ -981,6 +987,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
// For debug builds, log event loop stalls to dropbox for analysis.
|
||||
if (StrictMode.conditionallyEnableDebugLogging()) {
|
||||
Slog.i(TAG, "Enabled StrictMode for PolicyThread's Looper");
|
||||
}
|
||||
|
||||
Looper.loop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1349,6 +1349,11 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
}
|
||||
}
|
||||
|
||||
// For debug builds, log event loop stalls to dropbox for analysis.
|
||||
if (StrictMode.conditionallyEnableDebugLogging()) {
|
||||
Slog.i(TAG, "Enabled StrictMode logging for AThread's Looper");
|
||||
}
|
||||
|
||||
Looper.loop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user