Skip to contentSkip to conversation

libtraceeval task-eval: Fix passing wrong teval to helper function

PATCH New Steven Rostedt 1 participant 1 message Oct 25, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtraceeval task-eval: Fix passing wrong teval to helper function

From: "Steven Rostedt (Google)" <[email protected]>

The addition of helper functions was supposed to make the code simpler, but instead it ended up passing the wrong teval into one of the helper functions due to a cut-and-paste error.

Pass the teval_cpus descriptor to the cpu helper function and not the teval_threads descriptor.

Fixes f38b05e1 ("libtraceeval task-eval: Simplify logic by adding more helper functions")
---
 samples/task-eval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
samples/task-eval.c +1 -1
index 178936d..5b6da1a 100644
@@ -677,7 +677,7 @@ static void sched_out(struct task_data *tdata, const char *comm,
 	/* Update the individual thread as well */
 
 	insert_thread_data(pdata->teval_threads, pid, RUNNING, prio, delta, record->ts);
-	insert_cpu_data(pdata->teval_threads, record->cpu, RUNNING, delta, record->ts);
+	insert_cpu_data(pdata->teval_cpus, record->cpu, RUNNING, delta, record->ts);
 }
 
 static void sched_in(struct task_data *tdata, const char *comm,
Signature · 1 line
2.45.2