diff options
Diffstat (limited to 'include/trace/events/power.h')
-rw-r--r-- | include/trace/events/power.h | 90 |
1 files changed, 32 insertions, 58 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index d2349b6b531a..82904291c2b8 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -62,28 +62,45 @@ TRACE_EVENT(cpu_idle_miss, (unsigned long)__entry->state, (__entry->below)?"below":"above") ); -TRACE_EVENT(powernv_throttle, +#ifdef CONFIG_ARM_PSCI_CPUIDLE +DECLARE_EVENT_CLASS(psci_domain_idle, - TP_PROTO(int chip_id, const char *reason, int pmax), + TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle), - TP_ARGS(chip_id, reason, pmax), + TP_ARGS(cpu_id, state, s2idle), TP_STRUCT__entry( - __field(int, chip_id) - __string(reason, reason) - __field(int, pmax) + __field(u32, cpu_id) + __field(u32, state) + __field(bool, s2idle) ), TP_fast_assign( - __entry->chip_id = chip_id; - __assign_str(reason); - __entry->pmax = pmax; + __entry->cpu_id = cpu_id; + __entry->state = state; + __entry->s2idle = s2idle; ), - TP_printk("Chip %d Pmax %d %s", __entry->chip_id, - __entry->pmax, __get_str(reason)) + TP_printk("cpu_id=%lu state=0x%lx is_s2idle=%s", + (unsigned long)__entry->cpu_id, (unsigned long)__entry->state, + (__entry->s2idle)?"yes":"no") +); + +DEFINE_EVENT(psci_domain_idle, psci_domain_idle_enter, + + TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle), + + TP_ARGS(cpu_id, state, s2idle) ); +DEFINE_EVENT(psci_domain_idle, psci_domain_idle_exit, + + TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle), + + TP_ARGS(cpu_id, state, s2idle) +); +#endif + TRACE_EVENT(pstate_sample, TP_PROTO(u32 core_busy, @@ -195,6 +212,7 @@ TRACE_EVENT(cpu_frequency_limits, (unsigned long)__entry->cpu_id) ); +#ifdef CONFIG_PM_SLEEP TRACE_EVENT(device_pm_callback_start, TP_PROTO(struct device *dev, const char *pm_ops, int event), @@ -243,6 +261,7 @@ TRACE_EVENT(device_pm_callback_end, TP_printk("%s %s, err=%d", __get_str(driver), __get_str(device), __entry->error) ); +#endif TRACE_EVENT(suspend_resume, @@ -300,53 +319,7 @@ DEFINE_EVENT(wakeup_source, wakeup_source_deactivate, TP_ARGS(name, state) ); -/* - * The clock events are used for clock enable/disable and for - * clock rate change - */ -DECLARE_EVENT_CLASS(clock, - - TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), - - TP_ARGS(name, state, cpu_id), - - TP_STRUCT__entry( - __string( name, name ) - __field( u64, state ) - __field( u64, cpu_id ) - ), - - TP_fast_assign( - __assign_str(name); - __entry->state = state; - __entry->cpu_id = cpu_id; - ), - - TP_printk("%s state=%lu cpu_id=%lu", __get_str(name), - (unsigned long)__entry->state, (unsigned long)__entry->cpu_id) -); - -DEFINE_EVENT(clock, clock_enable, - - TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), - - TP_ARGS(name, state, cpu_id) -); - -DEFINE_EVENT(clock, clock_disable, - - TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), - - TP_ARGS(name, state, cpu_id) -); - -DEFINE_EVENT(clock, clock_set_rate, - - TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), - - TP_ARGS(name, state, cpu_id) -); - +#ifdef CONFIG_ARCH_OMAP2PLUS /* * The power domain events are used for power domains transitions */ @@ -378,6 +351,7 @@ DEFINE_EVENT(power_domain, power_domain_target, TP_ARGS(name, state, cpu_id) ); +#endif /* * CPU latency QoS events used for global CPU latency QoS list updates |