linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	James Clark <james.clark@arm.com>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf: Ignore format attributes with an unknown perf_event_attr field
Date: Thu, 1 Sep 2022 14:28:39 -0500	[thread overview]
Message-ID: <CAL_JsqLW=Vd=isvPd7_X3Vwp=0XUYjKqLkGYW2cztkd6JnGntQ@mail.gmail.com> (raw)
In-Reply-To: <3361AE1E-778E-46F7-A51B-D143DF29FEAD@gmail.com>

On Thu, Sep 1, 2022 at 2:22 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
>
>
> On September 1, 2022 3:47:10 PM GMT-03:00, Rob Herring <robh@kernel.org> wrote:
> >If the kernel exposes a new perf_event_attr field in a format attr, perf
> >will return an error stating the specified PMU can't be found. For
> >example, a format attr with 'config3:0-63' causes an error if config3 is
> >unknown to perf. This causes a compatibility issue between a newer
> >kernel and an older perf tool.
> >
> >The addition here makes any attr string up to the ':' ignored, but
> >still checks the 'bits' portion.
>
> So, can you please show what is the behavior of the tool, with an actual command line and it's output, before and after your patch?

Before this patch with a kernel adding 'config3' I get:

# perf record -e arm_spe// -- true
event syntax error: 'arm_spe//'
                     \___ Cannot find PMU `arm_spe'. Missing kernel support?
Run 'perf list' for a list of valid events

 Usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list
available events

After this patch, I get:

# perf record -e arm_spe// -- true
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.091 MB perf.data ]

Rob

  reply	other threads:[~2022-09-01 19:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 18:47 [PATCH] perf: Ignore format attributes with an unknown perf_event_attr field Rob Herring
2022-09-01 19:22 ` Arnaldo Carvalho de Melo
2022-09-01 19:28   ` Rob Herring [this message]
2022-09-02  6:52 ` Namhyung Kim
2022-09-02 15:25   ` Rob Herring
2022-09-06 18:15     ` Namhyung Kim
2022-09-09 20:11       ` Rob Herring
2022-09-09 20:30         ` 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='CAL_JsqLW=Vd=isvPd7_X3Vwp=0XUYjKqLkGYW2cztkd6JnGntQ@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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).