summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-09-10 20:09:31 +0300
committerEduardo Valentin <edubezval@gmail.com>2015-10-30 20:41:38 +0300
commit9876b1a4431a3f0959c70e1d817ecab6440cb2e6 (patch)
treeb6daed14bd0206687c8b645b5295c273a1306d71 /drivers/thermal
parenta76caf55e5b356ba20a5a43ac4d9f7a04b20941d (diff)
downloadlinux-9876b1a4431a3f0959c70e1d817ecab6440cb2e6.tar.xz
devfreq_cooling: add trace information
Tracing is useful for debugging and performance tuning. Add similar traces to what's present in the cpu cooling device. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/devfreq_cooling.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index a032c5d5c374..a27206815066 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -25,6 +25,8 @@
#include <linux/pm_opp.h>
#include <linux/thermal.h>
+#include <trace/events/thermal.h>
+
static DEFINE_MUTEX(devfreq_lock);
static DEFINE_IDR(devfreq_idr);
@@ -293,6 +295,9 @@ static int devfreq_cooling_get_requested_power(struct thermal_cooling_device *cd
/* Get static power */
static_power = get_static_power(dfc, freq);
+ trace_thermal_power_devfreq_get_power(cdev, status, freq, dyn_power,
+ static_power);
+
*power = dyn_power + static_power;
return 0;
@@ -348,6 +353,7 @@ static int devfreq_cooling_power2state(struct thermal_cooling_device *cdev,
break;
*state = i;
+ trace_thermal_power_devfreq_limit(cdev, freq, *state, power);
return 0;
}