diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index aa108c53e286..ccb64d09f380 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -271,3 +271,4 @@ 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); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_power_cap); diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c index 2d1aeaba38a8..5471c9091f5f 100644 --- a/drivers/thermal/gov_power_allocator.c +++ b/drivers/thermal/gov_power_allocator.c @@ -14,6 +14,8 @@ #define CREATE_TRACE_POINTS #include +#undef CREATE_TRACE_POINTS +#include #include "thermal_core.h" @@ -462,6 +464,7 @@ static int allocate_power(struct thermal_zone_device *tz, } power_range = pid_controller(tz, control_temp, max_allocatable_power); + trace_android_vh_thermal_power_cap(&power_range); divvy_up_power(weighted_req_power, max_power, num_actors, total_weighted_req_power, power_range, granted_power, diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index 5e525ef0df7b..dd42f1d6766a 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -44,6 +44,10 @@ DECLARE_HOOK(android_vh_get_thermal_zone_device, TP_PROTO(struct thermal_zone_device *tz), TP_ARGS(tz)); +DECLARE_HOOK(android_vh_thermal_power_cap, + TP_PROTO(u32 *power_range), + TP_ARGS(power_range)); + #endif /* _TRACE_HOOK_THERMAL_H */ /* This part must be outside protection */ #include