Re: [PATCH v2 0/3] perf: introduce perf based task analyzer

From: Namhyung Kim
Date: Thu Dec 08 2022 - 14:11:16 EST


On Thu, Dec 8, 2022 at 4:15 AM Petar Gligoric <petar.gligor@xxxxxxxxx> wrote:
>
> > > Thanks for the input! For this patchset we explicitly decided against
> > > extending "perf sched timehist" - after some pros and cons. Mainly we
> > > didn't want to break existing programs (which might parse the output of
> > > perf sched) and also the goal of the task-analyzer is a bit different.
> > > E.g what will follow as a follow-up patch, is to show IRQs visually
> > > pleasing intermixed with tasks to show potential sources of task
> > > latency. This will be offered as an option for the task-analyzer, but
> > > would be too much functionality for "perf sched timehist". This was the
> > > main reason why we decided against the extension.
> >
> > Then you might want to add a new sub-command under perf sched.
> > But I guess we can just add a new option for the different output
> > format in the perf sched timehist.
> >
> > Anyway, "perf script" is a generic tool not targeting specific events.
> > This functionality requires sched_switch (and more?) then we need
> > the record part to make sure the data has the events. That's why
> > it's natural to have it in perf sched IMHO.
> >
> > Thanks,
> > Namhyung
>
> We assumed that python scripts should not only be used as a "generic tool".

Oh, I didn't know you worked on a separate python script.
Sorry, I just read the cover letter (but not the diffstat) and
I thought you added it to the builtin-script.c. ;-)

> There are a number of tools like flamegraph, netdev-times, dropmonitor and
> other scripts that analyze and look at *very specific* events. The question is
> rather, why should this be implemented in C? When using Python - with batteries
> included - less code has to be written for the identical result, and it is less
> error-prone than C (less technical debt). We have measured the performance,
> even for very large perf.data files, and again we see no problems.

Then I have no problem with python. Please take a look at the
scripts/python/bin directory to provide shortcuts for record/report.

Thanks,
Namhyung


>
> But maybe this should be clarified in principle! What do you say Arnaldo, Ian,
> ...?
>
> Petar
>