agp: kill agp_flush_chipset and corresponding ioctl
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / power.h
blob286784d69b8f480343244d8046327a5a7d9883d9
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM power
4 #if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_POWER_H
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
10 #ifndef _TRACE_POWER_ENUM_
11 #define _TRACE_POWER_ENUM_
12 enum {
13 POWER_NONE = 0,
14 POWER_CSTATE = 1, /* C-State */
15 POWER_PSTATE = 2, /* Fequency change or DVFS */
16 POWER_SSTATE = 3, /* Suspend */
18 #endif
21 * The power events are used for cpuidle & suspend (power_start, power_end)
22 * and for cpufreq (power_frequency)
24 DECLARE_EVENT_CLASS(power,
26 TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
28 TP_ARGS(type, state, cpu_id),
30 TP_STRUCT__entry(
31 __field( u64, type )
32 __field( u64, state )
33 __field( u64, cpu_id )
36 TP_fast_assign(
37 __entry->type = type;
38 __entry->state = state;
39 __entry->cpu_id = cpu_id;
42 TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
43 (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
46 DEFINE_EVENT(power, power_start,
48 TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
50 TP_ARGS(type, state, cpu_id)
53 DEFINE_EVENT(power, power_frequency,
55 TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
57 TP_ARGS(type, state, cpu_id)
60 TRACE_EVENT(power_end,
62 TP_PROTO(unsigned int cpu_id),
64 TP_ARGS(cpu_id),
66 TP_STRUCT__entry(
67 __field( u64, cpu_id )
70 TP_fast_assign(
71 __entry->cpu_id = cpu_id;
74 TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
79 * The clock events are used for clock enable/disable and for
80 * clock rate change
82 DECLARE_EVENT_CLASS(clock,
84 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
86 TP_ARGS(name, state, cpu_id),
88 TP_STRUCT__entry(
89 __string( name, name )
90 __field( u64, state )
91 __field( u64, cpu_id )
94 TP_fast_assign(
95 __assign_str(name, name);
96 __entry->state = state;
97 __entry->cpu_id = cpu_id;
100 TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
101 (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
104 DEFINE_EVENT(clock, clock_enable,
106 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
108 TP_ARGS(name, state, cpu_id)
111 DEFINE_EVENT(clock, clock_disable,
113 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
115 TP_ARGS(name, state, cpu_id)
118 DEFINE_EVENT(clock, clock_set_rate,
120 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
122 TP_ARGS(name, state, cpu_id)
126 * The power domain events are used for power domains transitions
128 DECLARE_EVENT_CLASS(power_domain,
130 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
132 TP_ARGS(name, state, cpu_id),
134 TP_STRUCT__entry(
135 __string( name, name )
136 __field( u64, state )
137 __field( u64, cpu_id )
140 TP_fast_assign(
141 __assign_str(name, name);
142 __entry->state = state;
143 __entry->cpu_id = cpu_id;
146 TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
147 (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
150 DEFINE_EVENT(power_domain, power_domain_target,
152 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
154 TP_ARGS(name, state, cpu_id)
157 #endif /* _TRACE_POWER_H */
159 /* This part must be outside protection */
160 #include <trace/define_trace.h>