diff options
-rw-r--r-- | arch/arm/mach-tegra/pm.c | 8 | ||||
-rw-r--r-- | include/trace/events/power.h | 23 |
2 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index e0a33c1da395..e53effb9b669 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -45,6 +45,8 @@ #include <linux/pm_qos_params.h> #include <linux/tegra_audio.h> +#include <trace/events/power.h> + #include <asm/cacheflush.h> #include <asm/cpu_pm.h> #include <asm/hardware/gic.h> @@ -534,6 +536,7 @@ unsigned int tegra_idle_lp2_last(unsigned int sleep_time, unsigned int flags) * are in LP2 state and irqs are disabled */ if (flags & TEGRA_POWER_CLUSTER_MASK) { + trace_cpu_cluster(POWER_CPU_CLUSTER_START); set_power_timers(pdata->cpu_timer, 0, clk_get_rate_all_locked(tegra_pclk)); tegra_cluster_switch_prolog(mode); @@ -570,9 +573,10 @@ unsigned int tegra_idle_lp2_last(unsigned int sleep_time, unsigned int flags) if (sleep_time) tegra_lp2_set_trigger(0); - if (flags & TEGRA_POWER_CLUSTER_MASK) + if (flags & TEGRA_POWER_CLUSTER_MASK) { tegra_cluster_switch_epilog(mode); - + trace_cpu_cluster(POWER_CPU_CLUSTER_DONE); + } tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_epilog); #if INSTRUMENT_CLUSTER_SWITCH diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 63031aa5b6dd..9c9699a2b457 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -52,6 +52,11 @@ enum { POWER_CPU_SCALE_DONE, }; +enum { + POWER_CPU_CLUSTER_START, + POWER_CPU_CLUSTER_DONE, +}; + #endif TRACE_EVENT(cpu_hotplug, @@ -99,6 +104,24 @@ TRACE_EVENT(cpu_scale, (unsigned long)__entry->state) ); +TRACE_EVENT(cpu_cluster, + + TP_PROTO(int state), + + TP_ARGS(state), + + TP_STRUCT__entry( + __field(u64, state) + ), + + TP_fast_assign( + __entry->state = state; + ), + + TP_printk("state=%lu", + (unsigned long)__entry->state) +); + DEFINE_EVENT(cpu, cpu_frequency, TP_PROTO(unsigned int frequency, unsigned int cpu_id), |