Fixing deadlock in OomAdjProfiler.
During dumping, the ActivityManager lock is held. If a CPU time update was scheduled before a dump but the background thread was working on a task that required the ActivityManager lock, OomAdjProfiler would wait indefinitely for the update in the dump() method because the AM lock is already taken in the main thread. Removing the wait and updating the CPU time in the main thread during dumping only should avoid the potential deadlock. Bug: 130635979 Test: adb shell dumpsys activity Change-Id: Ibafe79b46babe16f589ec28d525174f9a01f00b8
Loading
Please register or sign in to comment