Loading drivers/thermal/thermal_core.c +4 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,7 @@ void handle_thermal_trip(struct thermal_zone_device *tz, int trip) * So, start monitoring again. */ monitor_thermal_zone(tz); trace_thermal_handle_trip(tz, trip); } /** Loading Loading @@ -567,6 +568,7 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) ret = tz->ops->set_trips(tz, low, high); if (ret) dev_err(&tz->device, "Failed to set trips: %d\n", ret); trace_thermal_set_trip(tz); exit: mutex_unlock(&tz->lock); Loading Loading @@ -621,6 +623,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, if (!tz->ops->get_temp) return; trace_thermal_device_update(tz, event); update_temperature(tz); thermal_zone_set_trips(tz); Loading Loading @@ -1934,6 +1937,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev) current_target = instance->target; } } trace_cdev_update_start(cdev); cdev->ops->set_cur_state(cdev, current_target); if (cdev->ops->set_min_state) cdev->ops->set_min_state(cdev, min_target); Loading include/trace/events/thermal.h +86 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,23 @@ TRACE_EVENT(thermal_temperature, __entry->temp) ); TRACE_EVENT(cdev_update_start, TP_PROTO(struct thermal_cooling_device *cdev), TP_ARGS(cdev), TP_STRUCT__entry( __string(type, cdev->type) ), TP_fast_assign( __assign_str(type, cdev->type); ), TP_printk("type=%s update start", __get_str(type)) ); TRACE_EVENT(cdev_update, TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target, Loading Loading @@ -98,6 +115,75 @@ TRACE_EVENT(thermal_zone_trip, show_tzt_type(__entry->trip_type)) ); TRACE_EVENT(thermal_handle_trip, TP_PROTO(struct thermal_zone_device *tz, int trip), TP_ARGS(tz, trip), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, trip) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->trip = trip; ), TP_printk("thermal_zone=%s id=%d handle trip=%d", __get_str(thermal_zone), __entry->id, __entry->trip) ); TRACE_EVENT(thermal_device_update, TP_PROTO(struct thermal_zone_device *tz, int event), TP_ARGS(tz, event), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, event) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->event = event; ), TP_printk("thermal_zone=%s id=%d received event:%d", __get_str(thermal_zone), __entry->id, __entry->event) ); TRACE_EVENT(thermal_set_trip, TP_PROTO(struct thermal_zone_device *tz), TP_ARGS(tz), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, low) __field(int, high) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->low = tz->prev_low_trip; __entry->high = tz->prev_high_trip; ), TP_printk("thermal_zone=%s id=%d low trip=%d high trip=%d", __get_str(thermal_zone), __entry->id, __entry->low, __entry->high) ); TRACE_EVENT(thermal_power_cpu_get_power, TP_PROTO(const struct cpumask *cpus, unsigned long freq, u32 *load, size_t load_len, u32 dynamic_power, u32 static_power), Loading Loading
drivers/thermal/thermal_core.c +4 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,7 @@ void handle_thermal_trip(struct thermal_zone_device *tz, int trip) * So, start monitoring again. */ monitor_thermal_zone(tz); trace_thermal_handle_trip(tz, trip); } /** Loading Loading @@ -567,6 +568,7 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) ret = tz->ops->set_trips(tz, low, high); if (ret) dev_err(&tz->device, "Failed to set trips: %d\n", ret); trace_thermal_set_trip(tz); exit: mutex_unlock(&tz->lock); Loading Loading @@ -621,6 +623,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, if (!tz->ops->get_temp) return; trace_thermal_device_update(tz, event); update_temperature(tz); thermal_zone_set_trips(tz); Loading Loading @@ -1934,6 +1937,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev) current_target = instance->target; } } trace_cdev_update_start(cdev); cdev->ops->set_cur_state(cdev, current_target); if (cdev->ops->set_min_state) cdev->ops->set_min_state(cdev, min_target); Loading
include/trace/events/thermal.h +86 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,23 @@ TRACE_EVENT(thermal_temperature, __entry->temp) ); TRACE_EVENT(cdev_update_start, TP_PROTO(struct thermal_cooling_device *cdev), TP_ARGS(cdev), TP_STRUCT__entry( __string(type, cdev->type) ), TP_fast_assign( __assign_str(type, cdev->type); ), TP_printk("type=%s update start", __get_str(type)) ); TRACE_EVENT(cdev_update, TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target, Loading Loading @@ -98,6 +115,75 @@ TRACE_EVENT(thermal_zone_trip, show_tzt_type(__entry->trip_type)) ); TRACE_EVENT(thermal_handle_trip, TP_PROTO(struct thermal_zone_device *tz, int trip), TP_ARGS(tz, trip), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, trip) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->trip = trip; ), TP_printk("thermal_zone=%s id=%d handle trip=%d", __get_str(thermal_zone), __entry->id, __entry->trip) ); TRACE_EVENT(thermal_device_update, TP_PROTO(struct thermal_zone_device *tz, int event), TP_ARGS(tz, event), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, event) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->event = event; ), TP_printk("thermal_zone=%s id=%d received event:%d", __get_str(thermal_zone), __entry->id, __entry->event) ); TRACE_EVENT(thermal_set_trip, TP_PROTO(struct thermal_zone_device *tz), TP_ARGS(tz), TP_STRUCT__entry( __string(thermal_zone, tz->type) __field(int, id) __field(int, low) __field(int, high) ), TP_fast_assign( __assign_str(thermal_zone, tz->type); __entry->id = tz->id; __entry->low = tz->prev_low_trip; __entry->high = tz->prev_high_trip; ), TP_printk("thermal_zone=%s id=%d low trip=%d high trip=%d", __get_str(thermal_zone), __entry->id, __entry->low, __entry->high) ); TRACE_EVENT(thermal_power_cpu_get_power, TP_PROTO(const struct cpumask *cpus, unsigned long freq, u32 *load, size_t load_len, u32 dynamic_power, u32 static_power), Loading