diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-02-16 16:27:59 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-03-19 13:08:51 -0700 |
commit | 76d74018bd0ccd1d8ea8455cf91d4104c948789f (patch) | |
tree | ccebf35069333cc5f390d9e99663166bc15bdaf3 /drivers/cpufreq | |
parent | e58ac65571f02eac9e832ea4d03e447d109ea8b0 (diff) |
cpufreq interactive governor: event tracing
Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_interactive.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 8fc147c66f9..62e7456ae50 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -30,6 +30,9 @@ #include <linux/kthread.h> #include <linux/mutex.h> +#define CREATE_TRACE_POINTS +#include <trace/events/cpufreq_interactive.h> + #include <asm/cputime.h> static atomic_t active_count = ATOMIC_INIT(0); @@ -182,7 +185,11 @@ static void cpufreq_interactive_timer(unsigned long data) new_freq = pcpu->freq_table[index].frequency; if (pcpu->target_freq == new_freq) + { + trace_cpufreq_interactive_already(data, cpu_load, + pcpu->target_freq, new_freq); goto rearm_if_notmax; + } /* * Do not scale down unless we have been at this frequency for the @@ -190,10 +197,16 @@ static void cpufreq_interactive_timer(unsigned long data) */ if (new_freq < pcpu->target_freq) { if (pcpu->timer_run_time - pcpu->freq_change_time - < min_sample_time) + < min_sample_time) { + trace_cpufreq_interactive_notyet(data, cpu_load, + pcpu->target_freq, new_freq); goto rearm; + } } + trace_cpufreq_interactive_target(data, cpu_load, pcpu->target_freq, + new_freq); + if (new_freq < pcpu->target_freq) { pcpu->target_freq = new_freq; spin_lock_irqsave(&down_cpumask_lock, flags); @@ -381,6 +394,8 @@ static int cpufreq_interactive_up_task(void *data) pcpu->freq_change_time_in_idle = get_cpu_idle_time_us(cpu, &pcpu->freq_change_time); + trace_cpufreq_interactive_up(cpu, pcpu->target_freq, + pcpu->policy->cur); } } @@ -427,6 +442,8 @@ static void cpufreq_interactive_freq_down(struct work_struct *work) pcpu->freq_change_time_in_idle = get_cpu_idle_time_us(cpu, &pcpu->freq_change_time); + trace_cpufreq_interactive_down(cpu, pcpu->target_freq, + pcpu->policy->cur); } } |