diff options
author | Javi Merino <javi.merino@arm.com> | 2015-09-10 18:09:31 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:51:21 +0900 |
commit | cf0a0e76138ed0ef34310a5579521f82cd274f51 (patch) | |
tree | 37b4a31a27debe1d84210cbe6ce06d89d3ddc0f9 /drivers/thermal | |
parent | 78a64199ce54125c23c10c7c4164ba425c9dd189 (diff) |
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>
[jy0922.shim: apply from mainline with fixup of fuzz]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/devfreq_cooling.c | 6 |
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; } |