mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Cc: Eduardo Valentin <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Punit Agrawal <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
parent
47d104ba58
commit
100a8fdbf5
2 changed files with 42 additions and 0 deletions
|
|
@ -38,6 +38,9 @@
|
|||
#include <net/netlink.h>
|
||||
#include <net/genetlink.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/thermal.h>
|
||||
|
||||
#include "thermal_core.h"
|
||||
#include "thermal_hwmon.h"
|
||||
|
||||
|
|
@ -463,6 +466,7 @@ static void update_temperature(struct thermal_zone_device *tz)
|
|||
tz->temperature = temp;
|
||||
mutex_unlock(&tz->lock);
|
||||
|
||||
trace_thermal_temperature(tz);
|
||||
dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
|
||||
tz->last_temperature, tz->temperature);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue