Skip to content
Commit 15755084 authored by Jing Ji's avatar Jing Ji
Browse files

Track the child processes that are forked by app processes

Apps could use Runtime.exec() to spawn child process and framework
will have no idea about its lifecycle. Now track those processes
whenever we find them - currently during the cpu stats sampling
they could be spotted. If it's consuming too much CPU while its
parent app process are also in the background, kill it.

By default we allow up to 32 such processes; the process with the
worst oom adj score of their parents will be killed if there are
too many of them.

Bug: 160548789
Bug: 157089413
Test: atest AppChildProcessTest
Test: atest CtsAppTestCases:ActivityManagerTest
Change-Id: I95b20a1f36ccd43d09027201d14872305b169d8d
parent 8353fe00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment