diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 060bc7e72ad0..d2c167e8d3ea 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -277,3 +277,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_audio_usb_offload_ep_action); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_audio_usb_offload_synctype); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_atomic_remove_fb); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_drm_atomic_check_modeset); +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 13891745a971..7d7a903fc772 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" @@ -505,6 +507,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, for (count = 0; count < tz->trips; count++) handle_thermal_trip(tz, count); + + trace_android_vh_get_thermal_zone_device(tz); } EXPORT_SYMBOL_GPL(thermal_zone_device_update); diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index 96723ac9a76b..31127ee42718 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -33,6 +33,12 @@ DECLARE_HOOK(android_vh_enable_thermal_power_throttle, DECLARE_HOOK(android_vh_thermal_power_cap, TP_PROTO(u32 *power_range), TP_ARGS(power_range)); + +struct thermal_zone_device; +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