sched/walt: move trace_sched_compute_energy tracepoint

In walt_find_energy_efficient_cpu, the trace for compute energy
was being called just prior to an update to best energy cpu. The
goal of the trace is to print the selected state of the routine,
not an intermediate state.

Change-Id: I8132b42e65b9b3bada9316c0ba738fa3baac9f49
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
Stephen Dickey 2021-11-12 16:25:44 -08:00 committed by Rishabh Bhatnagar
parent 9b29827dec
commit d0718d29fb

View File

@ -873,9 +873,6 @@ int walt_find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
NULL);
}
trace_sched_compute_energy(p, cpu, cur_energy,
prev_energy, best_energy, best_energy_cpu, &output);
if (cur_energy < best_energy) {
best_energy = cur_energy;
best_energy_cpu = cpu;
@ -886,6 +883,9 @@ int walt_find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
best_energy_cpu = cpu;
}
}
trace_sched_compute_energy(p, cpu, cur_energy,
prev_energy, best_energy, best_energy_cpu, &output);
}
/*