Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 610646ec authored by jinqian's avatar jinqian Committed by Amit Pundir
Browse files

ANDROID: uid_cputime: Adds accounting for the cputimes per uid.



Adds proc files /proc/uid_cputime/show_uid_stat and
/proc/uid_cputime/remove_uid_range.

show_uid_stat lists the total utime and stime for the active as well as
terminated processes for each of the uids.

Writing a range of uids to remove_uid_range will delete the accounting
for all the uids within that range.

Change-Id: I21d9210379da730b33ddc1a0ea663c8c9d2ac15b

[AmitP: Refactored the original patch because upstream commit
        605dc2b3 ("tsacct: Convert obsolete cputime type to nsecs")
        made cputime_t type obsolete, so use u64 nanoseconds directly instead.

        Also folded following android-4.9 changes into this patch
        48a9906c0fd8 ("ANDROID: proc: uid_cputime: create uids from kuids")
        453ac31cab34 ("ANDROID: proc: uid_cputime: fix show_uid_stat permission")]
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent 055cbfa4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment