diff options
author | Sumanth Korikkar <sumanthk@linux.ibm.com> | 2020-08-17 09:27:54 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-08-21 10:22:23 -0300 |
commit | 4b04e0decd2518e54e3f371abf3d883b3198663d (patch) | |
tree | 23587f90b77b3c9fc8f5de84c6bb80ee5f75f679 /tools | |
parent | da2968ff879b9e74688cdc658f646971991d2c56 (diff) |
perf test: Fix basic bpf filtering test
BPF basic filtering test fails on s390x (when vmlinux debuginfo is
utilized instead of /proc/kallsyms)
Info:
- bpf_probe_load installs the bpf code at do_epoll_wait.
- For s390x, do_epoll_wait resolves to 3 functions including inlines.
found inline addr: 0x43769e
Probe point found: __s390_sys_epoll_wait+6
found inline addr: 0x437290
Probe point found: do_epoll_wait+0
found inline addr: 0x4375d6
Probe point found: __se_sys_epoll_wait+6
- add_bpf_event creates evsel for every probe in a BPF object. This
results in 3 evsels.
Solution:
- Expected result = 50% of the samples to be collected from epoll_wait *
number of entries present in the evlist.
Committer testing:
# perf test 42
42: BPF filter :
42.1: Basic BPF filtering : Ok
42.2: BPF pinning : Ok
42.3: BPF prologue generation : Ok
42.4: BPF relocation checker : Ok
#
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: bpf@vger.kernel.org
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
LPU-Reference: 20200817072754.58344-1-sumanthk@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/tests/bpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 5d20bf8397f0..cd77e334e577 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -197,7 +197,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), perf_mmap__read_done(&md->core); } - if (count != expect) { + if (count != expect * evlist->core.nr_entries) { pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count); goto out_delete_evlist; } |