From: "Wangnan (F)" <wangnan0@huawei.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: <acme@kernel.org>, <ast@fb.com>, <pi3orama@163.com>,
<linux-kernel@vger.kernel.org>, <lizefan@huawei.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
He Kuang <hekuang@huawei.com>, Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH 00/14] perf clang: Support compiling BPF script use builtin clang
Date: Mon, 26 Sep 2016 09:49:30 +0800 [thread overview]
Message-ID: <57E87EAA.2090308@huawei.com> (raw)
In-Reply-To: <20160924151559.GA49831@ast-mbp.thefacebook.com>
On 2016/9/24 23:16, Alexei Starovoitov wrote:
> On Fri, Sep 23, 2016 at 12:49:47PM +0000, Wang Nan wrote:
>> This patch set is the first step to implement features I announced
>> in LinuxCon NA 2016. See page 31 of:
>>
>> http://events.linuxfoundation.org/sites/events/files/slides/Performance%20Monitoring%20and%20Analysis%20Using%20perf%20and%20BPF_1.pdf
>>
>> This patch set links LLVM and Clang libraries to perf, so perf
>> is able to compile BPF script to BPF object on the fly.
> Nice!
> So single perf binary won't have llvm external dependency anymore
> or both ways will be maintained?
> The command line stays the same?
Yes. This patch set doesn't change interface. It compiles BPF script
with builtin clang, and if it fail, fall back to external clang.
> If I understand the patches correctly, this set is establishing
> the basic functionality and more complex features coming?
>
Yes. Following steps are:
1. Ease of use improvement: automatically include BPF functions
declaration and macros.
2. Perf's hook: compile part of BPF script into native code, run
them in perf when something happen. Create a channel, coordinate
BPF and native code use bpf-output event.
3. Define a new language to support common profiling task. I'm not
very clear what the new language should be. It may looks like lua,
perf converts it to C then to LLVM IR with builtin clang.
Thank you.
next prev parent reply other threads:[~2016-09-26 1:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 12:49 Wang Nan
2016-09-23 12:49 ` [PATCH 01/14] tools build: Support compiling C++ source file Wang Nan
2016-09-28 14:33 ` Jiri Olsa
2016-09-23 12:49 ` [PATCH 02/14] perf tools: Add feature detection for g++ Wang Nan
2016-09-23 12:49 ` [PATCH 03/14] perf tools: Add feature detection for LLVM Wang Nan
2016-09-23 12:49 ` [PATCH 04/14] perf tools: Add feature detection for clang Wang Nan
2016-09-23 12:49 ` [PATCH 05/14] perf build: Add clang and llvm compile and linking support Wang Nan
2016-09-23 12:49 ` [PATCH 06/14] perf clang: Add builtin clang support ant test case Wang Nan
2016-09-23 12:49 ` [PATCH 07/14] perf clang: Use real file system for #include Wang Nan
2016-09-23 12:49 ` [PATCH 08/14] perf clang: Allow passing CFLAGS to builtin clang Wang Nan
2016-09-23 12:49 ` [PATCH 09/14] perf clang: Update test case to use real BPF script Wang Nan
2016-09-23 12:49 ` [PATCH 10/14] perf clang: Support compile IR to BPF object and add testcase Wang Nan
2016-09-23 12:49 ` [PATCH 11/14] perf tools: Extract kernel build option detector as utils Wang Nan
2016-09-23 12:49 ` [PATCH 12/14] perf bpf: Compile BPF script use builtin cflags support Wang Nan
2016-09-23 12:50 ` [PATCH 13/14] perf clang: Pass fill path compiler Wang Nan
2016-09-23 12:50 ` [PATCH 14/14] perf clang: Pass correct CFLAGS to builtin clang Wang Nan
2016-09-24 15:16 ` [PATCH 00/14] perf clang: Support compiling BPF script use " Alexei Starovoitov
2016-09-26 1:49 ` Wangnan (F) [this message]
2016-09-26 23:47 ` Alexei Starovoitov
[not found] ` <CA+JHD93WWAnyPM8e2MGw4SoJ16f_j52qdWsS=MuEzBkzCdXYEw@mail.gmail.com>
2016-09-27 1:49 ` Wangnan (F)
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=57E87EAA.2090308@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=ast@fb.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=pi3orama@163.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
Powered by JetHome