From: Jiri Olsa <jolsa@redhat.com>
To: Song Liu <songliubraving@fb.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
David Carrillo Cisneros <davidca@fb.com>
Subject: Re: [PATCH] perf utils: silent "Couldn't synthesize bpf events" warning for EPERM
Date: Mon, 4 Feb 2019 21:30:18 +0100 [thread overview]
Message-ID: <20190204203018.GD4794@krava> (raw)
In-Reply-To: <41F4E192-ABD1-41BF-9BAE-45E78DD719B3@fb.com>
On Mon, Feb 04, 2019 at 07:33:06PM +0000, Song Liu wrote:
>
>
> > On Feb 4, 2019, at 11:31 AM, Song Liu <songliubraving@fb.com> wrote:
> >
> > Synthesizing BPF events is only supported for root. Silent warning msg
> > when non-root user runs perf-record.
great, it was annoying ;-)
Tested-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
> >
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: Jiri Olsa <jolsa@redhat.com>
> > Reported-by: David Carrillo-Cisneros <davidca@fb.com>
> > Tested-by: David Carrillo-Cisneros <davidca@fb.com>
> > Signed-off-by: Song Liu <songliubraving@fb.com>
> > ---
> > tools/perf/util/bpf-event.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
> > index 796ef793f4ce..62dda96b0096 100644
> > --- a/tools/perf/util/bpf-event.c
> > +++ b/tools/perf/util/bpf-event.c
> > @@ -236,8 +236,8 @@ int perf_event__synthesize_bpf_events(struct perf_tool *tool,
> > pr_debug("%s: can't get next program: %s%s",
> > __func__, strerror(errno),
> > errno == EINVAL ? " -- kernel too old?" : "");
> > - /* don't report error on old kernel */
> > - err = (errno == EINVAL) ? 0 : -1;
> > + /* don't report error on old kernel or EPERM */
> > + err = (errno == EINVAL || errno == EPERM) ? 0 : -1;
> > break;
> > }
> > fd = bpf_prog_get_fd_by_id(id);
> > --
> > 2.17.1
> >
>
> CC David.
next prev parent reply other threads:[~2019-02-04 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 19:31 [PATCH] perf utils: silent "Couldn't synthesize bpf events" warning for EPERM Song Liu
2019-02-04 19:33 ` Song Liu
2019-02-04 20:30 ` Jiri Olsa [this message]
2019-02-15 9:32 ` [tip:perf/core] perf utils: Silence " tip-bot for Song Liu
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=20190204203018.GD4794@krava \
--to=jolsa@redhat.com \
--cc=Kernel-team@fb.com \
--cc=acme@redhat.com \
--cc=davidca@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=songliubraving@fb.com \
/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.