trace: thermal: add another parameter 'power' to the tracing function

This patch adds another parameter to the trace function:
trace_thermal_power_devfreq_get_power().

In case when we call directly driver's code for the real power,
we do not have static/dynamic_power values. Instead we get total
power in the '*power' value. The 'static_power' and
'dynamic_power' are set to 0.

Therefore, we have to trace that '*power' value in this scenario.

CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ingo Molnar <mingo@redhat.com>
CC: Zhang Rui <rui.zhang@intel.com>
CC: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Javi Merino <javi.merino@kernel.org>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>

authored by Lukasz Luba and committed by Zhang Rui 771ffa14 2be83da8

+8 -5
+1 -1
drivers/thermal/devfreq_cooling.c
··· 321 321 } 322 322 323 323 trace_thermal_power_devfreq_get_power(cdev, status, freq, dyn_power, 324 - static_power); 324 + static_power, *power); 325 325 326 326 return 0; 327 327 fail:
+7 -4
include/trace/events/thermal.h
··· 151 151 TRACE_EVENT(thermal_power_devfreq_get_power, 152 152 TP_PROTO(struct thermal_cooling_device *cdev, 153 153 struct devfreq_dev_status *status, unsigned long freq, 154 - u32 dynamic_power, u32 static_power), 154 + u32 dynamic_power, u32 static_power, u32 power), 155 155 156 - TP_ARGS(cdev, status, freq, dynamic_power, static_power), 156 + TP_ARGS(cdev, status, freq, dynamic_power, static_power, power), 157 157 158 158 TP_STRUCT__entry( 159 159 __string(type, cdev->type ) ··· 161 161 __field(u32, load ) 162 162 __field(u32, dynamic_power ) 163 163 __field(u32, static_power ) 164 + __field(u32, power) 164 165 ), 165 166 166 167 TP_fast_assign( ··· 170 169 __entry->load = (100 * status->busy_time) / status->total_time; 171 170 __entry->dynamic_power = dynamic_power; 172 171 __entry->static_power = static_power; 172 + __entry->power = power; 173 173 ), 174 174 175 - TP_printk("type=%s freq=%lu load=%u dynamic_power=%u static_power=%u", 175 + TP_printk("type=%s freq=%lu load=%u dynamic_power=%u static_power=%u power=%u", 176 176 __get_str(type), __entry->freq, 177 - __entry->load, __entry->dynamic_power, __entry->static_power) 177 + __entry->load, __entry->dynamic_power, __entry->static_power, 178 + __entry->power) 178 179 ); 179 180 180 181 TRACE_EVENT(thermal_power_devfreq_limit,