diff options
| author | Juri Lelli <juri.lelli@arm.com> | 2015-04-30 17:35:23 +0100 |
|---|---|---|
| committer | Leo Yan <leo.yan@linaro.org> | 2016-05-10 16:54:42 +0800 |
| commit | dd2460f3872f1b89839aedb21b999e802542c32b (patch) | |
| tree | 14a19258bf1bffed8c02d8c54be84cf6949ae3a9 /kernel | |
| parent | e5a25996d3a3f46f3abee77f868b922903f5f60e (diff) | |
DEBUG: sched,cpufreq: add cpu_capacity change tracepoint
This is useful when we want to compare cpu utilization and
cpu curr capacity side by side.
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 11 | ||||
| -rw-r--r-- | kernel/sched/sched.h | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b5ea9ec335d8..9b74b86aba3a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4698,6 +4698,17 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg) #endif +/* + * Returns the current capacity of cpu after applying both + * cpu and freq scaling. + */ +unsigned long capacity_curr_of(int cpu) +{ + return cpu_rq(cpu)->cpu_capacity_orig * + arch_scale_freq_capacity(NULL, cpu) + >> SCHED_CAPACITY_SHIFT; +} + static inline bool energy_aware(void) { return sched_feat(ENERGY_AWARE); diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 983c132af11b..db3f3db9849c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1512,17 +1512,6 @@ static inline unsigned long cpu_util(int cpu) return __cpu_util(cpu, 0); } -/* - * Returns the current capacity of cpu after applying both - * cpu and freq scaling. - */ -static inline unsigned long capacity_curr_of(int cpu) -{ - return cpu_rq(cpu)->cpu_capacity_orig * - arch_scale_freq_capacity(NULL, cpu) - >> SCHED_CAPACITY_SHIFT; -} - #endif #ifdef CONFIG_CPU_FREQ_GOV_SCHED |
