public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	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>,
	Ian Rogers <irogers@google.com>
Subject: Re: [PATCH 3/3] perf list: Add 'pfm' to list libpfm4 events
Date: Wed, 23 Sep 2020 07:10:03 +0200	[thread overview]
Message-ID: <20200923051003.GE2893484@krava> (raw)
In-Reply-To: <CAM9d7cjbaijYvMJRZbhiiuK6hxx2NQpicM_82wetVsOuWOQXew@mail.gmail.com>

On Wed, Sep 23, 2020 at 07:42:41AM +0900, Namhyung Kim wrote:
> Hi Jiri,
> 
> On Wed, Sep 23, 2020 at 5:42 AM Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > On Wed, Sep 09, 2020 at 02:58:49PM +0900, Namhyung Kim wrote:
> >
> > SNIP
> >
> > >  int parse_events__is_hardcoded_term(struct parse_events_term *term)
> > > diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
> > > index d735acb6c29c..26ae2c8c0932 100644
> > > --- a/tools/perf/util/pfm.c
> > > +++ b/tools/perf/util/pfm.c
> > > @@ -12,6 +12,7 @@
> > >  #include "util/parse-events.h"
> > >  #include "util/pmu.h"
> > >  #include "util/pfm.h"
> > > +#include "util/string2.h"
> > >
> > >  #include <string.h>
> > >  #include <linux/kernel.h>
> > > @@ -227,7 +228,7 @@ print_libpfm_events_raw(pfm_pmu_info_t *pinfo, pfm_event_info_t *info)
> > >               printf("%s::%s\n", pinfo->name, info->name);
> > >  }
> > >
> > > -void print_libpfm_events(bool name_only, bool long_desc)
> > > +void print_libpfm_events(const char *event_glob, bool name_only, bool long_desc)
> > >  {
> > >       pfm_event_info_t info;
> > >       pfm_pmu_info_t pinfo;
> > > @@ -265,6 +266,9 @@ void print_libpfm_events(bool name_only, bool long_desc)
> > >                       if (ret != PFM_SUCCESS)
> > >                               continue;
> > >
> > > +                     if (event_glob && !strglobmatch_nocase(info.name, event_glob))
> > > +                             continue;
> >
> > you could mentioned in changelog that it also enables glob
> > matching for pfm events.. but other than then looks ok
> 
> Well, I have mentioned it in the changelog.. :)
> Do you want an example?

ugh.. sry, overlooked that

jirka

> 
> >
> > Acked/Tested-by: Jiri Olsa <jolsa@kernel.org>
> 
> Thanks
> Namhyung
> 
> >
> > > +
> > >                       if (!name_only && !printed_pmu) {
> > >                               printf("%s:\n", pinfo.name);
> > >                               printed_pmu = true;
> > > diff --git a/tools/perf/util/pfm.h b/tools/perf/util/pfm.h
> > > index 7d70dda87012..036e2d97b260 100644
> > > --- a/tools/perf/util/pfm.h
> > > +++ b/tools/perf/util/pfm.h
> > > @@ -13,7 +13,7 @@
> > >  int parse_libpfm_events_option(const struct option *opt, const char *str,
> > >                       int unset);
> > >
> > > -void print_libpfm_events(bool name_only, bool long_desc);
> > > +void print_libpfm_events(const char *event_glob, bool name_only, bool long_desc);
> > >
> > >  #else
> > >  #include <linux/compiler.h>
> > > @@ -26,7 +26,8 @@ static inline int parse_libpfm_events_option(
> > >       return 0;
> > >  }
> > >
> > > -static inline void print_libpfm_events(bool name_only __maybe_unused,
> > > +static inline void print_libpfm_events(const char *event_glob __maybe_unused,
> > > +                                    bool name_only __maybe_unused,
> > >                                      bool long_desc __maybe_unused)
> > >  {
> > >  }
> > > --
> > > 2.28.0.526.ge36021eeef-goog
> > >
> >
> 


  reply	other threads:[~2020-09-23  5:10 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 [this message]
2020-09-22 20:50   ` Ian Rogers
2020-09-22 22:45     ` Namhyung Kim
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=20200923051003.GE2893484@krava \
    --to=jolsa@redhat.com \
    --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=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@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