public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Wangnan (F)" <wangnan0@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf test BPF failing on 4.15.0-rc6
Date: Wed, 3 Jan 2018 15:33:07 -0300	[thread overview]
Message-ID: <20180103183307.GC13097@kernel.org> (raw)
In-Reply-To: <20180103182701.GB13097@kernel.org>

Em Wed, Jan 03, 2018 at 03:27:01PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Continuing investigation...
> 
> After applying the fallback patch to allow new tools to work with older
> kernels:
> 
> [root@felicio ~]# perf test bpf
> 39: BPF filter                                            :
> 39.1: Basic BPF filtering                                 : Ok
> 39.2: BPF pinning                                         : Ok
> 39.3: BPF prologue generation                             : Ok
> 39.4: BPF relocation checker                              : Ok
> [root@felicio ~]# uname -a
> Linux felicio.ghostprotocols.net 4.13.0-rc7+ #1 SMP Mon Sep 11 13:56:18 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
> [root@felicio ~]# rpm -q glibc
> glibc-2.17-157.el7_3.2.x86_64
> [root@felicio ~]#
> 
> After applying the patch below I get to, which is what I am trying to
> fix now:
> 
> [root@jouet ~]# perf test bpf
> 39: BPF filter                                            :
> 39.1: Basic BPF filtering                                 : Ok
> 39.2: BPF pinning                                         : Ok
> 39.3: BPF prologue generation                             : FAILED!
> 39.4: BPF relocation checker                              : Skip
> [root@jouet ~]# 

Update the patch to the one at the end of this message to make it work
with older glibcs, so that we ask for epoll_pwait() and hook into that
as well().

Now checking why 39.3 fails...

- Arnaldo

diff --git a/tools/perf/tests/bpf-script-example.c b/tools/perf/tests/bpf-script-example.c
index 268e5f8e4aa2..d1e67e271675 100644
--- a/tools/perf/tests/bpf-script-example.c
+++ b/tools/perf/tests/bpf-script-example.c
@@ -31,7 +31,7 @@ struct bpf_map_def SEC("maps") flip_table = {
 	.max_entries = 1,
 };
 
-SEC("func=SyS_epoll_wait")
+SEC("func=SyS_epoll_pwait")
 int bpf_func__SyS_epoll_wait(void *ctx)
 {
 	int ind =0;
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index 0512f1b5bfdb..7c04e2d5b60b 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -25,7 +25,7 @@ static int epoll_wait_loop(void)
 
 	/* Should fail NR_ITERS times */
 	for (i = 0; i < NR_ITERS; i++)
-		epoll_wait(-(i + 1), NULL, 0, 0);
+		epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
 	return 0;
 }
 

  reply	other threads:[~2018-01-03 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 18:59 perf test BPF failing on 4.15.0-rc6 Arnaldo Carvalho de Melo
2018-01-03  4:42 ` Wangnan (F)
2018-01-03  4:58   ` Wangnan (F)
2018-01-03 16:58     ` Arnaldo Carvalho de Melo
2018-01-03 18:27       ` Arnaldo Carvalho de Melo
2018-01-03 18:33         ` Arnaldo Carvalho de Melo [this message]
2018-01-03 20:13           ` Arnaldo Carvalho de Melo
2018-01-04  1:37             ` Wangnan (F)
2018-01-04 15:39               ` Arnaldo Carvalho de Melo

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=20180103183307.GC13097@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox