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:
Punit Agrawal 2014-07-29 11:50:48 +01:00 • committed by Eduardo Valentin
commit 100a8fdbf5
2 changed files with 42 additions and 0 deletions

View file

@ -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);
}