All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Stephane Eranian <eranian@google.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] perf list: Add 'pfm' to list libpfm4 events
Date: Wed, 23 Sep 2020 07:45:34 +0900	[thread overview]
Message-ID: <CAM9d7cgBduHhqqS6eOJUuvxMvTpp4aN+OoN5cfwxAFAcQ_uEoQ@mail.gmail.com> (raw)
In-Reply-To: <CAP-5=fVT1SMB2G91SS28UVwXggZmYAGaqOPp2ozPoA=Yf0P3Ww@mail.gmail.com>

HI Ian,

On Wed, Sep 23, 2020 at 5:50 AM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, Sep 8, 2020 at 10:59 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Print libpfm4 events with 'perf list pfm' command like others.
> > When libpfm4 support is not enabled, it'd print nothing.
> > Also it support glob pattern matching for event name.
> >
> >   $ perf list pfm
> >
> >   List of pre-defined events (to be used in --pfm-events):
> >
> >   ix86arch:
> >     UNHALTED_CORE_CYCLES
> >       [count core clock cycles whenever the clock signal ...
> >     INSTRUCTION_RETIRED
> >       [count the number of instructions at retirement. ...
> >     ...
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> >
> > diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
> > index 10ab5e40a34f..167868053fe0 100644
> > --- a/tools/perf/builtin-list.c
> > +++ b/tools/perf/builtin-list.c
> > @@ -14,6 +14,7 @@
> >  #include "util/pmu.h"
> >  #include "util/debug.h"
> >  #include "util/metricgroup.h"
> > +#include "util/pfm.h"
> >  #include <subcmd/pager.h>
> >  #include <subcmd/parse-options.h>
> >  #include <stdio.h>
> > @@ -42,7 +43,7 @@ int cmd_list(int argc, const char **argv)
> >                 OPT_END()
> >         };
> >         const char * const list_usage[] = {
> > -               "perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]",
> > +               "perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|pfm|event_glob]",
>
> Should this be "#ifdef HAVE_LIBPFM" to avoid advertising pfm events
> when support isn't compiled in?

I thought about that too, but it's a keyword and current code
already handles it to print nothing, so I think it's ok to have.

Thanks
Namhyung

  reply	other threads:[~2020-09-22 22:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  5:58 [PATCH 1/3] perf list: Remove dead code in argument check Namhyung Kim
2020-09-09  5:58 ` [PATCH 2/3] perf list: Do not print 'Metric Groups:' unnecessarily Namhyung Kim
2020-09-09 12:29   ` Arnaldo Carvalho de Melo
2020-09-09  5:58 ` [PATCH 3/3] perf list: Add 'pfm' to list libpfm4 events Namhyung Kim
2020-09-21  6:34   ` Namhyung Kim
2020-09-22 20:42   ` Jiri Olsa
2020-09-22 22:42     ` Namhyung Kim
2020-09-23  5:10       ` Jiri Olsa
2020-09-22 20:50   ` Ian Rogers
2020-09-22 22:45     ` Namhyung Kim [this message]
2020-09-09 12:27 ` [PATCH 1/3] perf list: Remove dead code in argument check Arnaldo Carvalho de Melo
2020-09-09 12:58   ` Namhyung Kim

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=CAM9d7cgBduHhqqS6eOJUuvxMvTpp4aN+OoN5cfwxAFAcQ_uEoQ@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.