Re: [PATCH 09/12] trace-cmd analyze: Add wake up latency timings

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

 



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;
> +}



[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