linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Alexei Starovoitov <ast@plumgrid.com>,
	Ingo Molnar <mingo@kernel.org>, pi3orama <pi3orama@163.com>
Cc: "Wangnan (F)" <wangnan0@huawei.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.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@redhat.com>, Kaixu Xia <xiakaixu@huawei.com>,
	Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	Zefan Li <lizefan@huawei.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	cti.systems-productivity-manager.ts@hitachi.com
Subject: Re: [GIT PULL 0/6] perf/core improvements and fixes
Date: Fri, 05 Jun 2015 06:48:50 +0900	[thread overview]
Message-ID: <5570C7C2.9030900@hitachi.com> (raw)
In-Reply-To: <55707B3F.2070704@plumgrid.com>

On 2015/06/05 1:22, Alexei Starovoitov wrote:
> On 6/4/15 7:04 AM, Ingo Molnar wrote:
>>>>  # perf record -e bpf_source.c cmdline
>>>>
>>>>  to create a eBPF filter from source,
>>>>
>>>> Use
>>>>
>>>> # perf record -e bpf_object.o cmdline
>>>>
>>>> to create a eBPF filter from object intermedia.
>>>>
>>>> Use
>>>>
>>>> # perf bpf compile bpf_source.c --kbuild=kernel-build-dir -o bpf_object.o
>>>>
>>>> to create the .o
>>>>
>>>> I think this should be enough. Currently only the second case has been implemented.
>> So if users cannot actually generate .o files then it's premature to merge this in
>> such an incomplete form!
>>
>> It should be possible to use a feature that we are merging.
> 
> of course it's usable :) There is some confusion here.
> To compile .c into .o one can easily use
> clang -O2 -emit-llvm -c file.c -o - | llc -march=bpf -o file.o
> any version of clang is ok,
> llc needs to be fresh with bpf backend.
> 
> For a lot of cases kernel headers are not needed, so above
> will work fine.
> For our TC examples we recommend to use 'bcc' alias:
> bcc() {
>    clang -O2 -emit-llvm -c $1 -o - | llc -march=bpf -filetype=obj -o 
> "`basename $1 .c`.o"
> }
> then compiling as easy as 'bcc file.c'
> 
> What Wang mentioned that we're working on is fully integrated 'bcc'.
> It will use clang/llvm as libraries, so no intermediate steps will
> be needed, but some folks will always have concerns about
> ultra-embedded environments where even 20Mb of libllvm.so is too much.
> 
> So I think we need to support both 'perf record -e file.[co]'

I think we'd better make 'perf record -e file.c' default and '-e file.o'
should be an option.

Thank you,

> 
> 


-- 
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com

  reply	other threads:[~2015-06-04 21:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 22:40 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 1/6] perf probe: Fix segfault when glob matching function without debuginfo Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 2/6] perf tools: Remove newline char when reading event scale and unit Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 3/6] perf machine: Fix the search for the kernel DSO on the unified list Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 4/6] perf tools: Move linux/kernel.h to tools/include Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 5/6] tools: Move tools/perf/util/include/linux/{list.h,poison.h} " Arnaldo Carvalho de Melo
2015-06-03 22:40 ` [PATCH 6/6] perf tools: Deal with kernel module names in '[]' correctly Arnaldo Carvalho de Melo
2015-06-04  5:48 ` [GIT PULL 0/6] perf/core improvements and fixes Ingo Molnar
2015-06-04  6:07   ` Wangnan (F)
2015-06-04  7:21     ` Ingo Molnar
2015-06-04 10:00       ` Wangnan (F)
2015-06-04 12:40         ` Ingo Molnar
2015-06-04 12:58           ` pi3orama
2015-06-04 14:04             ` Ingo Molnar
2015-06-04 16:22               ` Alexei Starovoitov
2015-06-04 21:48                 ` Masami Hiramatsu [this message]
2015-06-04 22:07                   ` Alexei Starovoitov
2015-06-05  6:41                 ` Ingo Molnar
2015-06-05  8:53                   ` Wangnan (F)
2015-06-05 12:05                     ` Ingo Molnar
2015-06-05 14:06                       ` Arnaldo Carvalho de Melo
2015-06-07 13:11                         ` Ingo Molnar
2015-06-05 13:59                     ` Arnaldo Carvalho de Melo
2015-06-04 10:17     ` [EXPERIENCE] My experience on using perf record BPF filter on a real usecase Wangnan (F)
2015-06-10  6:42       ` Alexei Starovoitov
2015-06-10  6:48         ` Wangnan (F)
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16 16:09 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-03-16 16:30 ` Ingo Molnar
2015-08-31 21:36 Arnaldo Carvalho de Melo
2015-09-01  8:26 ` Ingo Molnar
2015-03-31 20:59 Arnaldo Carvalho de Melo
2015-04-01  7:56 ` Ingo Molnar
2015-03-26 15:40 Arnaldo Carvalho de Melo
2015-03-27  7:37 ` Ingo Molnar
2014-05-12  9:27 Jiri Olsa
2014-05-12 15:59 ` Ingo Molnar
2014-04-30 10:11 Jiri Olsa
2014-05-01  6:26 ` Ingo Molnar
2012-10-31 14:48 Arnaldo Carvalho de Melo
2011-04-20 16:23 Arnaldo Carvalho de Melo
2011-04-21  8:58 ` Ingo Molnar
2011-02-16 22:54 Arnaldo Carvalho de Melo
2011-02-17 13:50 ` Ingo Molnar

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=5570C7C2.9030900@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@plumgrid.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=cti.systems-productivity-manager.ts@hitachi.com \
    --cc=daniel@iogearbox.net \
    --cc=dsahern@gmail.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=maddy@linux.vnet.ibm.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pi3orama@163.com \
    --cc=sukadev@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).