aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2014-07-29 06:50:48 -0400
committerEduardo Valentin <edubezval@gmail.com>2014-07-29 09:27:54 -0400
commit100a8fdbf525bb11796692a713c267be6523a890 (patch)
tree022fba36cc4c2ddc321ca7f069c987e491877f61 /include/trace
parent47d104ba5879790c7c91c3390b0b08399e168efe (diff)
thermal: trace: Trace temperature changes
Create a new event to trace the temperature of a thermal zone. Using this event trace the temperature changes of the thermal zone every-time it is updated. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/thermal.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/trace/events/thermal.h b/include/trace/events/thermal.h
new file mode 100644
index 000000000000..8c5ca96eccd6
--- /dev/null
+++ b/include/trace/events/thermal.h
@@ -0,0 +1,38 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM thermal
3
4#if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_THERMAL_H
6
7#include <linux/thermal.h>
8#include <linux/tracepoint.h>
9
10TRACE_EVENT(thermal_temperature,
11
12 TP_PROTO(struct thermal_zone_device *tz),
13
14 TP_ARGS(tz),
15
16 TP_STRUCT__entry(
17 __string(thermal_zone, tz->type)
18 __field(int, id)
19 __field(int, temp_prev)
20 __field(int, temp)
21 ),
22
23 TP_fast_assign(
24 __assign_str(thermal_zone, tz->type);
25 __entry->id = tz->id;
26 __entry->temp_prev = tz->last_temperature;
27 __entry->temp = tz->temperature;
28 ),
29
30 TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d",
31 __get_str(thermal_zone), __entry->id, __entry->temp_prev,
32 __entry->temp)
33);
34
35#endif /* _TRACE_THERMAL_H */
36
37/* This part must be outside protection */
38#include <trace/define_trace.h>