ANDROID: cpufreq: track per-task time in state
authorConnor O'Brien <connoro@google.com>
Thu, 1 Feb 2018 02:11:57 +0000 (18:11 -0800)
committerConnor O'Brien <connoro@google.com>
Thu, 12 Apr 2018 20:00:33 +0000 (13:00 -0700)
commit1302a3d8ce9cda4a70af3f5a617ca52015d12cab
tree65f2158dc684083df81df4948f2b57de3f851748
parenta2a9032a98b238059ca04ce40de73b22a8bc1a55
ANDROID: cpufreq: track per-task time in state

Add time in state data to task structs, and create
/proc/<pid>/time_in_state files to show how long each individual task
has run at each frequency.
Create a CONFIG_CPU_FREQ_TIMES option to enable/disable this tracking.

Signed-off-by: Connor O'Brien <connoro@google.com>
Bug: 72339335
Test: Read /proc/<pid>/time_in_state
Change-Id: Ia6456754f4cb1e83b2bc35efa8fbe9f8696febc8
drivers/cpufreq/Kconfig
drivers/cpufreq/Makefile
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_times.c [new file with mode: 0644]
fs/proc/base.c
include/linux/cpufreq_times.h [new file with mode: 0644]
include/linux/sched.h
kernel/exit.c
kernel/sched/core.c
kernel/sched/cputime.c