On Fri, 25 Mar 2022 19:37:03 +0000 John Keeping <john@xxxxxxxxxxxx> wrote: > > @@ -288,6 +337,24 @@ static void process_switch(struct analysis_data *data, > > task->start_ts = record->ts; > > cpu_data->current_pid = pid; > > > > + switch (task->last_state) { > > + case -1: > > + /* First time seen */ > > + break; > > + case 0: > > + update_sched_timings(&task->preempt, record->ts); > > + break; > > + case 0x1: > > + update_sched_timings(&task->sleep, record->ts); > > + break; > > + case 0x2: > > + update_sched_timings(&task->blocked, record->ts); > > + break; > > + default: > > + update_sched_timings(&task->other, record->ts); > > + } > > + task->last_state = val & 0x1f; > > val is next_pid here, does last_state even need to be updated for the > switched-to task? -ECUTANDPASTE :-p Thanks, -- Steve