Re: [PATCH 12/13] perf test: Test BPF prologue

From: Wangnan (F)
Date: Mon Nov 16 2015 - 20:31:45 EST




On 2015/11/17 9:29, Arnaldo Carvalho de Melo wrote:
Em Mon, Nov 16, 2015 at 12:10:14PM +0000, Wang Nan escreveu:
This patch introduces a new BPF script to test BPF prologue. The new
script probes at null_lseek, which is the function pointer when we try
to lseek on '/dev/null'.

null_lseek is chosen because it is a function pointer, so we don't need
to consider inlining and LTO.

By extracting file->f_mode, bpf-script-test-prologue.c should know whether
the file is writable or readonly. According to llseek_loop() and
bpf-script-test-prologue.c, one forth of total lseeks should be collected.
So I tentatively changed the section name key=val separator from '\n' to
';', applied all the patches up to this one (will review the last one
tomorrow), and tested it, reproducing your results, for some reason that
SEC() wasn't working, have to check again, using it expanded, as in my
previous tests, works, I updated the comments to reflect the tests I
did, please take a look.

I've pushed everything to my perf/ebpf branch, please let me know if
what is there is acceptable, then it will be up to Ingo to decide where
to put this, if in perf/urgent for this merge window, or in perf/core,
for the next one.

Ah, to extract the output for these BPF sub-tests I had to use -v, i.e.
just:

# perf test BPF
37: Test BPF filter : Ok
#

Ditto for the LLVM one.

Doesn't tell us too much about all those nice sub-tests...

How about:

# perf test -v BPF
37: Test BPF filter:
37.1: test a : Ok
37.2: test b : Ok
37.3: Test BPF prologue generation : Ok
37.4: Another... : Ok
37: Test BPF filter : Ok
#

Thanks!

Thanks to your work. I'm checking them now.

- Arnaldo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/