mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Cc: Eduardo Valentin <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Javi Merino <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
parent
a76caf55e5
commit
9876b1a443
2 changed files with 59 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue