diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 59ff0d4e2d81..aa108c53e286 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -270,3 +270,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_register); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_unregister); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_get_thermal_zone_device); diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 1eae4ec719a8..25b9dbda5e55 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -23,6 +23,8 @@ #define CREATE_TRACE_POINTS #include +#undef CREATE_TRACE_POINTS +#include #include "thermal_core.h" #include "thermal_hwmon.h" @@ -481,6 +483,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, handle_thermal_trip(tz, count); monitor_thermal_zone(tz); + + trace_android_vh_get_thermal_zone_device(tz); out: mutex_unlock(&tz->lock); } diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index 9cb2eb156d24..5e525ef0df7b 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -40,6 +40,10 @@ DECLARE_HOOK(android_vh_thermal_unregister, TP_PROTO(struct cpufreq_policy *policy), TP_ARGS(policy)); +DECLARE_HOOK(android_vh_get_thermal_zone_device, + TP_PROTO(struct thermal_zone_device *tz), + TP_ARGS(tz)); + #endif /* _TRACE_HOOK_THERMAL_H */ /* This part must be outside protection */ #include