From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Martin KaFai Lau <kafai@fb.com>
Cc: Matthias Kaehlcke <mka@chromium.org>,
Josh Poimboeuf <jpoimboe@redhat.com>, Yonghong Song <yhs@fb.com>,
Alexei Starovoitov <ast@fb.com>,
"David S. Miller" <davem@davemloft.net>,
Daniel Borkmann <daniel@iogearbox.net>,
Wang Nan <wangnan0@huawei.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: Re: 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name"
Date: Thu, 30 Nov 2017 00:01:10 -0300 [thread overview]
Message-ID: <20171130030110.GA18880@kernel.org> (raw)
In-Reply-To: <20171129223135.6iqvj6ho4ojxmhu6@kafai-mbp>
Em Wed, Nov 29, 2017 at 02:31:36PM -0800, Martin KaFai Lau escreveu:
> On Wed, Nov 29, 2017 at 06:15:43PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Nov 29, 2017 at 01:07:34PM -0800, Martin KaFai Lau escreveu:
> > > On Tue, Nov 28, 2017 at 04:05:19PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > [root@jouet ~]# perf test -v bpf
> > > > 39: BPF filter :
> > > > 39.1: Basic BPF filtering :
> > > > --- start ---
> > > > test child forked, pid 12198
> > > > Kernel build dir is set to /lib/modules/4.14.0+/build
> > > > set env: KBUILD_DIR=/lib/modules/4.14.0+/build
> > > [ ... ]
> > > > libbpf: failed to create map (name: 'flip_table'): Invalid argument
> > > > libbpf: failed to load object '[basic_bpf_test]'
> > > > bpf: load objects failed
> > > 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name")
> > > is introduced in 4.15.
> > > I think the perf@kernel-4.15 broke on older kernels like 4.14 because
> > > the new bpf prog/map name is only introduced since 4.15.
> > > The newer perf needs to be compatible with an older kernel?
> > Sure :-)
> Would the latest features introduced in perf/libbpf supposed to be
> available in the latest kernel only? What may be the reason that the
Yes, then the new perf binary should try to use the new stuff, if it
fails, use the old one, there is no requirement that one uses perf 4.14
in lockstep with the kernel 4.14 (or any other version), perf 4.15
should work with the 4.14 kernel as well as with 4.15 (or any other
future kernel), only limited by what it can grok up to when it was
released.
I'll test with a 4.15 kernel to confirm this, thanks for the
explanation!
> latest perf is installed with an older kernel while it does not gain new
> functionality?
See, for instance tools/perf/util/evsel.c, function perf_evsel__open(),
and all those fallbacks for features a new tool doesn't find on an older
kernel.
When the user asks for some feature that is not present in the older
kernel, then it fails and the tool calling perf_evsel__open() will use
perf_evlist__strerror_open() to provide as best an explanation to what
took place as possible.
- Arnaldo
next prev parent reply other threads:[~2017-11-30 3:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 19:05 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name" Arnaldo Carvalho de Melo
2017-11-29 21:07 ` Martin KaFai Lau
2017-11-29 21:15 ` Arnaldo Carvalho de Melo
2017-11-29 22:31 ` Martin KaFai Lau
2017-11-30 3:01 ` Arnaldo Carvalho de Melo [this message]
2017-11-30 16:53 ` [PATCH/RFC] " Arnaldo Carvalho de Melo
2017-11-30 18:28 ` Martin KaFai Lau
2017-11-30 19:00 ` Arnaldo Carvalho de Melo
2017-11-30 21:51 ` Alexei Starovoitov
2017-12-01 17:51 ` Arnaldo Carvalho de Melo
2017-12-02 1:15 ` Alexei Starovoitov
2017-11-30 22:09 ` Martin KaFai Lau
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=20171130030110.GA18880@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=aryabinin@virtuozzo.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mka@chromium.org \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
--cc=yhs@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.