Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491038

Re: [PATCH 00/14] perf clang: Support compiling BPF script use builtin clang

From "Wangnan (F)" <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH 00/14] perf clang: Support compiling BPF script use builtin clang
Date 2016-09-26 04:00 +0200
Message-ID <sltn3-5MO-1@gated-at.bofh.it> (permalink)
References <skyf7-3M0-9@gated-at.bofh.it> <skWUa-2Ch-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/14] perf clang: Support compiling BPF script use builtin clang Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 03/14] perf tools: Add feature detection for LLVM Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 01/14] tools build: Support compiling C++ source file Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
    Re: [PATCH 01/14] tools build: Support compiling C++ source file Jiri Olsa <jolsa@redhat.com> - 2016-09-28 16:40 +0200
  [PATCH 04/14] perf tools: Add feature detection for clang Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 09/14] perf clang: Update test case to use real BPF script Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 08/14] perf clang: Allow passing CFLAGS to builtin clang Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 13/14] perf clang: Pass fill path compiler Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 12/14] perf bpf: Compile BPF script use builtin cflags support Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 02/14] perf tools: Add feature detection for g++ Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 11/14] perf tools: Extract kernel build option detector as utils Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 06/14] perf clang: Add builtin clang support ant test case Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 05/14] perf build: Add clang and llvm compile and linking support Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 07/14] perf clang: Use real file system for #include Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 14/14] perf clang: Pass correct CFLAGS to builtin clang Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  [PATCH 10/14] perf clang: Support compile IR to BPF object and add testcase Wang Nan <wangnan0@huawei.com> - 2016-09-23 15:00 +0200
  Re: [PATCH 00/14] perf clang: Support compiling BPF script use  builtin clang Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-09-24 17:20 +0200
    Re: [PATCH 00/14] perf clang: Support compiling BPF script use  builtin clang "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-26 04:00 +0200
      Re: [PATCH 00/14] perf clang: Support compiling BPF script use  builtin clang Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-09-27 01:50 +0200
        Re: [PATCH 00/14] perf clang: Support compiling BPF script use  builtin clang "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-27 04:00 +0200

csiph-web