On Sat, 26 Mar 2022 11:07:03 +0000 John Keeping <john@xxxxxxxxxxxx> wrote: > > > > + print_time(cpu_tasks[i]->runtime, '_'); > > > > + printf(" (%%%lld)\n", (task->runtime * 100) / total_time); > > > > > > Is there a reason for using the CPU-specific runtime for the value and > > > the total runtime for the percentage? > > > > > > I expected the percentage to be the percentage of this CPU's time spend > > > running the task. > > > > We modify it so that each CPU has the same run time, unless there's missed > > events at the start (later patches), and then we change total_time to be > > the total time of the events on the CPU and not the entire trace. > > I think we're talking about different things here, I probably wasn't > entirely clear about this. It's the numerator of this division that I'm > concerned about and I wonder if this should be: > > (cpu_tasks[i]->runtime * 100) / total_time Ah, I did misunderstand you. Yes, that's a typo. Thanks for pointing that out. I'll go fix it. -- Steve