linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: kan.liang@linux.intel.com, namhyung@kernel.org, jolsa@kernel.org,
	adrian.hunter@intel.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf evlist: Print hint for group
Date: Wed, 11 Sep 2024 12:52:32 -0300	[thread overview]
Message-ID: <ZuG8wCjFjeW3stUI@x1> (raw)
In-Reply-To: <CAP-5=fXjH5C0H8RWULGm9UJc36mp=1rfoeBCxVVoHxe2KnGY8g@mail.gmail.com>

On Mon, Sep 09, 2024 at 09:54:57AM -0700, Ian Rogers wrote:
> On Sun, Sep 8, 2024 at 1:28 PM <kan.liang@linux.intel.com> wrote:
> >
> > From: Kan Liang <kan.liang@linux.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@kernel.org>
> > Closes: https://lore.kernel.org/lkml/ZttgvduaKsVn1r4p@x1/
> > Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks, tested:

    Committer testing:
    
    So for a perf.data file _with_ a group:
    
      root@number:~# perf evlist -g
      {cpu_core/branch-instructions/pp,cpu_core/branches/}
      dummy:u
      root@number:~# perf evlist
      cpu_core/branch-instructions/pp
      cpu_core/branches/
      dummy:u
      # Tip: use 'perf evlist -g' to show group information
      root@number:~#
    
    Then for something _without_ a group, no hint:
    
      root@number:~# 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@number:~# perf evlist
      cpu_atom/cycles/P
      cpu_core/cycles/P
      dummy:u
      root@number:~#
    
    No suggestion, good.
    
    Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
    Reviewed-by: Ian Rogers <irogers@google.com>
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>


Applied.

- Arnaldo

      reply	other threads:[~2024-09-11 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-08 20:28 [PATCH] perf evlist: Print hint for group kan.liang
2024-09-09 16:54 ` Ian Rogers
2024-09-11 15:52   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZuG8wCjFjeW3stUI@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).