[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZuG8wCjFjeW3stUI@x1>
Date: Wed, 11 Sep 2024 12:52:32 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: kan.liang@...ux.intel.com, namhyung@...nel.org, jolsa@...nel.org,
adrian.hunter@...el.com, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf evlist: Print hint for group
On Mon, Sep 09, 2024 at 09:54:57AM -0700, Ian Rogers wrote:
> On Sun, Sep 8, 2024 at 1:28 PM <kan.liang@...ux.intel.com> wrote:
> >
> > From: Kan Liang <kan.liang@...ux.intel.com>
> >
> > An event group is a critical relationship. There is a -g option that can
> > display the relationship. But it's hard for a user to know when should
> > this option be applied.
> >
> > If there is an event group in the perf record, print a hint to suggest
> > the user apply the -g to display the group information.
> >
> > With the patch,
> >
> > $perf record -e "{cycles,instructions},instructions" sleep 1
> > [ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.024 MB perf.data (4 samples) ]
> >
> > $perf evlist
> > cycles
> > instructions
> > instructions
> > # Tip: use 'perf evlist -g' to show group information
> >
> > $perf evlist -g
> > {cycles,instructions}
> > instructions
> >
> > Suggested-by: Arnaldo Carvalho de Melo <acme@...nel.org>
> > Closes: https://lore.kernel.org/lkml/ZttgvduaKsVn1r4p@x1/
> > Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
>
> Reviewed-by: Ian Rogers <irogers@...gle.com>
Thanks, tested:
Committer testing:
So for a perf.data file _with_ a group:
root@...ber:~# perf evlist -g
{cpu_core/branch-instructions/pp,cpu_core/branches/}
dummy:u
root@...ber:~# perf evlist
cpu_core/branch-instructions/pp
cpu_core/branches/
dummy:u
# Tip: use 'perf evlist -g' to show group information
root@...ber:~#
Then for something _without_ a group, no hint:
root@...ber:~# perf record ls
<SNIP>
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.035 MB perf.data (7 samples) ]
root@...ber:~# perf evlist
cpu_atom/cycles/P
cpu_core/cycles/P
dummy:u
root@...ber:~#
No suggestion, good.
Suggested-by: Arnaldo Carvalho de Melo <acme@...nel.org>
Reviewed-by: Ian Rogers <irogers@...gle.com>
Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Applied.
- Arnaldo
Powered by blists - more mailing lists