diff options
author | Javi Merino <javi.merino@arm.com> | 2015-03-02 12:17:20 -0500 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2015-05-05 00:27:52 -0400 |
commit | 6828a4711f994bbd9d3fd27b7a541217fc37b341 (patch) | |
tree | 9a4bc66a10f15492d670fdc730eb65a07cfab7ed /include/trace/events/thermal.h | |
parent | 6b775e870c56c59c3e16531ea2307b797395f9f7 (diff) |
thermal: add trace events to the power allocator governor
Add trace events for the power allocator governor and the power actor
interface of the cpu cooling device.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'include/trace/events/thermal.h')
-rw-r--r-- | include/trace/events/thermal.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/trace/events/thermal.h b/include/trace/events/thermal.h index 0f4f95d63c03..8b1f80682b80 100644 --- a/include/trace/events/thermal.h +++ b/include/trace/events/thermal.h | |||
@@ -77,6 +77,64 @@ TRACE_EVENT(thermal_zone_trip, | |||
77 | __entry->trip_type) | 77 | __entry->trip_type) |
78 | ); | 78 | ); |
79 | 79 | ||
80 | TRACE_EVENT(thermal_power_cpu_get_power, | ||
81 | TP_PROTO(const struct cpumask *cpus, unsigned long freq, u32 *load, | ||
82 | size_t load_len, u32 dynamic_power, u32 static_power), | ||
83 | |||
84 | TP_ARGS(cpus, freq, load, load_len, dynamic_power, static_power), | ||
85 | |||
86 | TP_STRUCT__entry( | ||
87 | __bitmask(cpumask, num_possible_cpus()) | ||
88 | __field(unsigned long, freq ) | ||
89 | __dynamic_array(u32, load, load_len) | ||
90 | __field(size_t, load_len ) | ||
91 | __field(u32, dynamic_power ) | ||
92 | __field(u32, static_power ) | ||
93 | ), | ||
94 | |||
95 | TP_fast_assign( | ||
96 | __assign_bitmask(cpumask, cpumask_bits(cpus), | ||
97 | num_possible_cpus()); | ||
98 | __entry->freq = freq; | ||
99 | memcpy(__get_dynamic_array(load), load, | ||
100 | load_len * sizeof(*load)); | ||
101 | __entry->load_len = load_len; | ||
102 | __entry->dynamic_power = dynamic_power; | ||
103 | __entry->static_power = static_power; | ||
104 | ), | ||
105 | |||
106 | TP_printk("cpus=%s freq=%lu load={%s} dynamic_power=%d static_power=%d", | ||
107 | __get_bitmask(cpumask), __entry->freq, | ||
108 | __print_array(__get_dynamic_array(load), __entry->load_len, 4), | ||
109 | __entry->dynamic_power, __entry->static_power) | ||
110 | ); | ||
111 | |||
112 | TRACE_EVENT(thermal_power_cpu_limit, | ||
113 | TP_PROTO(const struct cpumask *cpus, unsigned int freq, | ||
114 | unsigned long cdev_state, u32 power), | ||
115 | |||
116 | TP_ARGS(cpus, freq, cdev_state, power), | ||
117 | |||
118 | TP_STRUCT__entry( | ||
119 | __bitmask(cpumask, num_possible_cpus()) | ||
120 | __field(unsigned int, freq ) | ||
121 | __field(unsigned long, cdev_state) | ||
122 | __field(u32, power ) | ||
123 | ), | ||
124 | |||
125 | TP_fast_assign( | ||
126 | __assign_bitmask(cpumask, cpumask_bits(cpus), | ||
127 | num_possible_cpus()); | ||
128 | __entry->freq = freq; | ||
129 | __entry->cdev_state = cdev_state; | ||
130 | __entry->power = power; | ||
131 | ), | ||
132 | |||
133 | TP_printk("cpus=%s freq=%u cdev_state=%lu power=%u", | ||
134 | __get_bitmask(cpumask), __entry->freq, __entry->cdev_state, | ||
135 | __entry->power) | ||
136 | ); | ||
137 | |||
80 | #endif /* _TRACE_THERMAL_H */ | 138 | #endif /* _TRACE_THERMAL_H */ |
81 | 139 | ||
82 | /* This part must be outside protection */ | 140 | /* This part must be outside protection */ |