Re: [PATCH 06/12] trace-cmd analyze: Add tracing of tasks and their states

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux