On Wed, Mar 23, 2022 at 10:57:23PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> > > If the sched_waking (or sched_wakeup) event is found, then use it to time > the wake up latency for each task. > > Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> > --- > +static void process_wakeup(struct analysis_data *data, > + struct tep_handle *tep, > + struct tep_record *record) > +{ > + struct cpu_data *cpu_data = &data->cpu_data[record->cpu]; > + struct task_cpu_item *cpu_task; > + struct task_item *task; > + unsigned long long val; > + int pid; > + > + tep_read_number_field(data->wakeup_pid, record->data, &val); > + pid = val; > + cpu_task = get_cpu_task(cpu_data, pid); Should this use get_task() instead of get_cpu_task()? I was trying this out and it provides a great overview of a trace but I found it strange that tasks affine to CPU N were also appearing in the list for CPU M. > + task = cpu_task->task; > + task->wakeup.last = record->ts; > + task->woken = true; > +}