Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1179768
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf |
| Date | 2015-07-08 15:10 +0200 |
| Message-ID | <pJXgT-38d-31@gated-at.bofh.it> (permalink) |
| References | <pHfMZ-3Uy-3@gated-at.bofh.it> <pHfWH-4bQ-49@gated-at.bofh.it> <pJHc7-1pU-39@gated-at.bofh.it> <pJHvt-1LQ-29@gated-at.bofh.it> <pJWuu-2A2-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Wed, Jul 08, 2015 at 07:45:34PM +0800, Wangnan (F) escreveu: > On 2015/7/8 4:16, Arnaldo Carvalho de Melo wrote: > >Em Tue, Jul 07, 2015 at 04:54:52PM -0300, Arnaldo Carvalho de Melo escreveu: > >>Em Wed, Jul 01, 2015 at 02:14:11AM +0000, Wang Nan escreveu: > >>>Error messages are also updated to notify users about the disable of > >>>BPF support of 'perf record' if libelf is missed or BPF API check > >>>failed. > >>Much better! > >But... I was all happy about this being linked with perf, went straight > >ahead to try to use it! No, its not possible, I have to go thru a series > >of other patches first... anticlimactic :-( > >So, please move this to just before we can use it, wiring it up should > >mean, hey, try this "hello, world" eBPF program right now! > It is not an easy work, since there is a bulk of code in > tools/perf/utils/bpf-loader.c depend on HAVE_LIBBPF_SUPPORT and > CONFIG_LIBBPF. If put this patch the final one, we will make hundreds > of lines of code avaiable by one patch. It is not good. Understood, makes sense, you are building the perf support step by step, so it is not possible to test it in the first, only compile test the initial wiring. > I have an idea that, put this patch after the llvm tester: > $ git log --oneline > d011a28 perf tools: Make perf depend on libbpf > 57ad12f perf tests: Add LLVM test for eBPF on-the-fly compiling > 8c7e20b perf tools: Auto detecting kernel include options > 442675f perf tools: Auto detecting kernel build directory > dcd9304 perf tools: Call clang to compile C source to object code > 864e2fb perf tools: Introduce llvm config options > 8558c38 bpf tools: Link all bpf objects onto a list > ... > Then before this patch, you can test llvm on-the-fly compiling without > parsing the > result .o: > $ perf test 38 > 38: Test LLVM searching and compiling : (skip bpf > parsing) Ok > After this patch, libbpf should be compiled so basic libbpf parsing can be > tested: > > $ perf test 38 > 38: Test LLVM searching and compiling : Ok That looks enough for me, 'perf test' should exercise the code, making sure that what was done up to that point got some testing. We need to try to avoid adding too much code that doesn't get exercised as soon as possible, otherwise we lose a lot of bisectability, i.e. when trying to find a problem using 'git bisect' we will hit the first place when all that code gets used and will be left with having to look at all the code up to that point instead of landing in a more likely culprit. - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v10 00/50] perf tools: filtering events using eBPF programs Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 18/50] bpf tools: Introduce bpf_load_program() to bpf.c Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 07/50] bpf tools: Check endianness and make libbpf fail early Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 25/50] perf tools: Call clang to compile C source to object code Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 02/50] tracing, perf: Implement BPF programs attached to uprobes Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 05/50] bpf tools: Open eBPF object file and do basic validation Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 22/50] bpf tools: Link all bpf objects onto a list Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 27/50] perf tools: Auto detecting kernel build directory Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 06/50] bpf tools: Read eBPF object from buffer Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 13/50] bpf tools: Collect relocation sections from SHT_REL sections Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 01/50] bpf: Use correct #ifdef controller for trace_call_bpf() Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 16/50] bpf tools: Create eBPF maps defined in an object file Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 [RFC PATCH v10 17/50] bpf tools: Relocate eBPF programs Wang Nan <wangnan0@huawei.com> - 2015-07-01 04:20 +0200 Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-08 15:10 +0200 Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-08 15:10 +0200
csiph-web