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 /drivers | |
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 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 5ca8e9517aae..0f30d11fb528 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -29,6 +29,7 @@ #include <linux/suspend.h> #include <linux/syscore_ops.h> #include <linux/tick.h> +#include <linux/sched.h> #include <trace/events/power.h> static LIST_HEAD(cpufreq_policy_list); @@ -473,6 +474,7 @@ static void cpufreq_notify_post_transition(struct cpufreq_policy *policy, void cpufreq_freq_transition_begin(struct cpufreq_policy *policy, struct cpufreq_freqs *freqs) { + int cpu; /* * Catch double invocations of _begin() which lead to self-deadlock. @@ -501,6 +503,8 @@ wait: spin_unlock(&policy->transition_lock); scale_freq_capacity(policy, freqs); + for_each_cpu(cpu, policy->cpus) + trace_cpu_capacity(capacity_curr_of(cpu), cpu); cpufreq_notify_transition(policy, freqs, CPUFREQ_PRECHANGE); } |