Re: [PATCH v5 0/8] perf report: Add latency and parallelism profiling

Andi Kleen
2025-02-06T18:57:49Z

On Thu, Feb 06, 2025 at 07:41:00PM +0100, Dmitry Vyukov wrote:
> On Thu, 6 Feb 2025 at 19:30, Andi Kleen <ak@linux.intel.com> wrote:
> >
> > Dmitry Vyukov <dvyukov@google.com> writes:
> >
> > > There are two notions of time: wall-clock time and CPU time.
> > > For a single-threaded program, or a program running on a single-core
> > > machine, these notions are the same. However, for a multi-threaded/
> > > multi-process program running on a multi-core machine, these notions are
> > > significantly different. Each second of wall-clock time we have
> > > number-of-cores seconds of CPU time.
> >
> > I'm curious how does this interact with the time / --time-quantum sort key?
> >
> > I assume it just works, but might be worth checking.
>
> I will check later. But if you have some concrete commands to try, it
> will help. I never used --time-quantum before.

perf report --sort time,overhead,sym

It just slices perf.data into time slices so you get a time series
instead of full aggregation.

--time-quantum is optional, but sets the slice length,

> > > tools/perf/util/symbol_conf.h | 8 +-
> >
> > We traditionally didn't do it, but in general test coverage
> > of perf report is too low, so I would recommend to add some simple
> > test case in the perf test scripts.
>
> What of this is testable within the current testing framework?

You can write a shell script that runs it and does
some basic sanity checking. tests/shell has a lot of examples.

If you don't do that someone will break it like it happened
to some of my features :/

> Also how do I run tests? I failed to figure it out.

Just "perf test"

-Andi