diff options
author | Lukasz Luba <lukasz.luba@arm.com> | 2023-12-20 23:17:48 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-12-29 18:01:00 +0100 |
commit | 792c3dc08ddcf29a514156bb72b3d2ad4998c69f (patch) | |
tree | fc1c369b9278b0c33a89c2638ba857c80efe7658 /drivers/thermal/gov_power_allocator.c | |
parent | thermal: gov_power_allocator: Refactor checks in divvy_up_power() (diff) | |
download | linux-792c3dc08ddcf29a514156bb72b3d2ad4998c69f.tar.gz linux-792c3dc08ddcf29a514156bb72b3d2ad4998c69f.tar.bz2 linux-792c3dc08ddcf29a514156bb72b3d2ad4998c69f.zip |
thermal: gov_power_allocator: Change trace functions
Change trace event trace_thermal_power_allocator() to not use dynamic
array for requested power and granted power for all power actors.
Instead, simplify the trace event and print other simple values.
Add new trace event to print power actor information of requested power
and granted power. That trace event would be called in a loop for each
power actor. The trace data would be easier to parse comparing to the
dynamic array implementation.
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/gov_power_allocator.c')
-rw-r--r-- | drivers/thermal/gov_power_allocator.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c index 9e35ebd7cb03..53283fd8a944 100644 --- a/drivers/thermal/gov_power_allocator.c +++ b/drivers/thermal/gov_power_allocator.c @@ -469,11 +469,12 @@ static int allocate_power(struct thermal_zone_device *tz, int control_temp) granted_power[i]); total_granted_power += granted_power[i]; + trace_thermal_power_actor(tz, i, req_power[i], + granted_power[i]); i++; } - trace_thermal_power_allocator(tz, req_power, total_req_power, - granted_power, total_granted_power, + trace_thermal_power_allocator(tz, total_req_power, total_granted_power, num_actors, power_range, max_allocatable_power, tz->temperature, control_temp - tz->temperature); |