lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 04 Jun 2015 15:07:26 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Ingo Molnar <mingo@...nel.org>, pi3orama <pi3orama@....com>
CC:	"Wangnan (F)" <wangnan0@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Brendan Gregg <brendan.d.gregg@...il.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	David Ahern <dsahern@...il.com>, He Kuang <hekuang@...wei.com>,
	Jiri Olsa <jolsa@...hat.com>, Kaixu Xia <xiakaixu@...wei.com>,
	Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
	Zefan Li <lizefan@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	cti.systems-productivity-manager.ts@...achi.com
Subject: Re: [GIT PULL 0/6] perf/core improvements and fixes

On 6/4/15 2:48 PM, Masami Hiramatsu wrote:
> 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.

what do you mean 'default' ? It's a command line :)
.c is easier to use of course, no question.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ