From: Ingo Molnar <mingo@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Alexei Starovoitov <ast@plumgrid.com>,
Brendan Gregg <brendan.d.gregg@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
David Ahern <dsahern@gmail.com>, He Kuang <hekuang@huawei.com>,
Jiri Olsa <jolsa@kernel.org>, Kaixu Xia <xiakaixu@huawei.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
pi3orama@163.com, Wang Nan <wangnan0@huawei.com>,
Zefan Li <lizefan@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [GIT PULL 00/24] perf/ebpf lib + llvm/clang building infrastructure
Date: Sat, 8 Aug 2015 10:06:36 +0200 [thread overview]
Message-ID: <20150808080635.GA5414@gmail.com> (raw)
In-Reply-To: <1438959032-8637-1-git-send-email-acme@kernel.org>
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> This is up to a test that checks that the infrastructure for getting
> a C source file and build it to a form that can then be used to upload it to
> the kernel is working.
>
> Wang has a tree where we go all the way to passing a .c file as an
> --event, but I thought about breaking the patchkit up to what is settled and
> the "perf test -v LLVM" point looks like a good cutoff point for demoing/testing
> what is in this patchkit.
Fair enough!
> It shouldn't affect people without the environment needed, as well it
> should check the environment for sanity and provide info about how to get it
> working, be it in the changeset logs, the docs and on tool output messages.o
>
> If you find anything in it that needs fixing, please let us know if you
> think we should fix it before merging it to this point or if something can be
> fixed in follow up patches.
>
> Wang's repo, rebased, almost builds, he should be refreshing this soon,
> fixing those trailing whitespace issues, that is stopping the rebase here:
>
> [acme@zoo linux]$ git remote -v | grep wang | head -1
> wangnan.github https://github.com/WangNan0/linux.git (fetch)
> [acme@zoo linux]$ git checkout -b ebpf-test wangnan.github/ebpf
> Branch ebpf-test set up to track remote branch ebpf from wangnan.github.
> Switched to a new branch 'ebpf-test'
> [acme@zoo linux]$ git rebase perf/ebpf
> First, rewinding head to replay your work on top of it...
> Applying: perf tests: Add LLVM test for eBPF on-the-fly compiling
> Using index info to reconstruct a base tree...
> M tools/perf/tests/Build
> M tools/perf/tests/builtin-test.c
> M tools/perf/tests/tests.h
> M tools/perf/util/llvm-utils.c
> M tools/perf/util/llvm-utils.h
> Falling back to patching base and 3-way merge...
> No changes -- Patch already applied.
> Applying: perf tools: Make perf depend on libbpf
> Using index info to reconstruct a base tree...
> M tools/perf/MANIFEST
> Falling back to patching base and 3-way merge...
> Auto-merging tools/perf/MANIFEST
> Applying: perf ebpf: Add the libbpf glue
> Applying: perf tools: Enable passing bpf object file to --event
> Applying: perf tools: Parse probe points of eBPF programs during preparation
> Applying: perf probe: Attach trace_probe_event with perf_probe_event
> Applying: perf record: Probe at kprobe points
> Applying: perf record: Load all eBPF object into kernel
> Applying: perf tools: Add bpf_fd field to evsel and config it
> Applying: perf tools: Attach eBPF program to perf event
> Applying: perf tools: Suppress probing messages when probing by BPF loading
> Applying: perf record: Add clang options for compiling BPF scripts
> Applying: perf tools: Infrastructure for compiling scriptlets when passing '.c' to --event
> Applying: perf tests: Enforce LLVM test for BPF test
> Applying: perf test: Enable 'perf test' run as test targets
> tools/perf/tests/builtin-test.c:279: trailing whitespace.
> + /*
> [acme@zoo linux]$
>
> After that whitespace thing is fixed, you'll get to a point where 'perf
> test -v BPF' will show you all the steps involved in, from a .c file do all the
> build process and loading, attaching to a kprobe, etc that we discussed, but
> those extra patches need more working before I can submit to you.
>
> Otherwise, please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 1354ac6ad84395660f551d0614a6ca39e5bfe8e3:
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-07 09:11:30 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-ebpf-for-mingo
>
> for you to fetch changes up to 9bc898c7019383b6aa2ae6cb2928c4ca926449f0:
>
> perf tests: Add LLVM test for eBPF on-the-fly compiling (2015-08-07 10:57:24 -0300)
>
> ----------------------------------------------------------------
> perf/ebpf library + llvm/clang infrastructure
>
> Infrastructure:
>
> - library for interfacing with the kernel eBPF infrastructure, with
> tools/perf/ targeted as a first user (Wang Nan)
>
> - llvm/clang infrastructure for building BPF object files from C source
> code (Wang Nan)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Wang Nan (24):
> bpf tools: Introduce 'bpf' library and add bpf feature check
> bpf tools: Allow caller to set printing function
> bpf tools: Open eBPF object file and do basic validation
> bpf tools: Read eBPF object from buffer
> bpf tools: Check endianness and make libbpf fail early
> bpf tools: Iterate over ELF sections to collect information
> bpf tools: Collect version and license from ELF sections
> bpf tools: Collect map definitions from 'maps' section
> bpf tools: Collect symbol table from SHT_SYMTAB section
> bpf tools: Collect eBPF programs from their own sections
> bpf tools: Collect relocation sections from SHT_REL sections
> bpf tools: Record map accessing instructions for each program
> bpf tools: Add bpf.c/h for common bpf operations
> bpf tools: Create eBPF maps defined in an object file
> bpf tools: Relocate eBPF programs
> bpf tools: Introduce bpf_load_program() to bpf.c
> bpf tools: Load eBPF programs in object files into kernel
> bpf tools: Introduce accessors for struct bpf_program
> bpf tools: Link all bpf objects onto a list
> perf tools: Introduce llvm config options
> perf tools: Call clang to compile C source to object code
> perf tools: Auto detecting kernel build directory
> perf tools: Auto detecting kernel include options
> perf tests: Add LLVM test for eBPF on-the-fly compiling
>
> tools/build/feature/Makefile | 6 +-
> tools/build/feature/test-bpf.c | 18 +
> tools/lib/bpf/.gitignore | 2 +
> tools/lib/bpf/Build | 1 +
> tools/lib/bpf/Makefile | 195 ++++++++
> tools/lib/bpf/bpf.c | 85 ++++
> tools/lib/bpf/bpf.h | 23 +
> tools/lib/bpf/libbpf.c | 1037 +++++++++++++++++++++++++++++++++++++++
> tools/lib/bpf/libbpf.h | 81 +++
> tools/perf/MANIFEST | 1 +
> tools/perf/tests/Build | 1 +
> tools/perf/tests/builtin-test.c | 4 +
> tools/perf/tests/llvm.c | 98 ++++
> tools/perf/tests/tests.h | 1 +
> tools/perf/util/Build | 1 +
> tools/perf/util/config.c | 4 +
> tools/perf/util/llvm-utils.c | 408 +++++++++++++++
> tools/perf/util/llvm-utils.h | 49 ++
> 18 files changed, 2014 insertions(+), 1 deletion(-)
> create mode 100644 tools/build/feature/test-bpf.c
> create mode 100644 tools/lib/bpf/.gitignore
> create mode 100644 tools/lib/bpf/Build
> create mode 100644 tools/lib/bpf/Makefile
> create mode 100644 tools/lib/bpf/bpf.c
> create mode 100644 tools/lib/bpf/bpf.h
> create mode 100644 tools/lib/bpf/libbpf.c
> create mode 100644 tools/lib/bpf/libbpf.h
> create mode 100644 tools/perf/tests/llvm.c
> create mode 100644 tools/perf/util/llvm-utils.c
> create mode 100644 tools/perf/util/llvm-utils.h
Pulled, thanks a lot Arnaldo!
Ingo
prev parent reply other threads:[~2015-08-08 8:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 14:50 [GIT PULL 00/24] perf/ebpf lib + llvm/clang building infrastructure Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 01/24] bpf tools: Introduce 'bpf' library and add bpf feature check Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 02/24] bpf tools: Allow caller to set printing function Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 03/24] bpf tools: Open eBPF object file and do basic validation Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 04/24] bpf tools: Read eBPF object from buffer Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 05/24] bpf tools: Check endianness and make libbpf fail early Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 06/24] bpf tools: Iterate over ELF sections to collect information Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 07/24] bpf tools: Collect version and license from ELF sections Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 08/24] bpf tools: Collect map definitions from 'maps' section Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 09/24] bpf tools: Collect symbol table from SHT_SYMTAB section Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 10/24] bpf tools: Collect eBPF programs from their own sections Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 11/24] bpf tools: Collect relocation sections from SHT_REL sections Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 12/24] bpf tools: Record map accessing instructions for each program Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 13/24] bpf tools: Add bpf.c/h for common bpf operations Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 14/24] bpf tools: Create eBPF maps defined in an object file Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 15/24] bpf tools: Relocate eBPF programs Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 16/24] bpf tools: Introduce bpf_load_program() to bpf.c Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 17/24] bpf tools: Load eBPF programs in object files into kernel Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 18/24] bpf tools: Introduce accessors for struct bpf_program Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 19/24] bpf tools: Link all bpf objects onto a list Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 20/24] perf tools: Introduce llvm config options Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 21/24] perf tools: Call clang to compile C source to object code Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 22/24] perf tools: Auto detecting kernel build directory Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 23/24] perf tools: Auto detecting kernel include options Arnaldo Carvalho de Melo
2015-08-07 14:50 ` [PATCH 24/24] perf tests: Add LLVM test for eBPF on-the-fly compiling Arnaldo Carvalho de Melo
2015-08-08 8:06 ` Ingo Molnar [this message]
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=20150808080635.GA5414@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ast@plumgrid.com \
--cc=brendan.d.gregg@gmail.com \
--cc=daniel@iogearbox.net \
--cc=dsahern@gmail.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
--cc=wangnan0@huawei.com \
--cc=xiakaixu@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