[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DC6736CC-5186-4A36-985A-A3F8BA142AA2@163.com>
Date: Mon, 3 Aug 2015 23:53:05 +0800
From: pi3orama <pi3orama@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: "Wangnan (F)" <wangnan0@...wei.com>, He Kuang <hekuang@...wei.com>,
Li Zefan <lizefan@...wei.com>,
"ast@...mgrid.com" <ast@...mgrid.com>,
"xiakaixu@...wei.com" <xiakaixu@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
David Ahern <dsahern@...il.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: perf eBPF patch ordering. was: Re: perf test LLVM was: Re: [GIT PULL 00/39] perf tools: filtering events using eBPF programs
发自我的 iPhone
> 在 2015年8月3日,下午11:19,Arnaldo Carvalho de Melo <acme@...nel.org> 写道:
>
> Em Mon, Aug 03, 2015 at 12:07:28PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Mon, Aug 03, 2015 at 10:37:59AM +0800, Wangnan (F) escreveu:
>>> On 2015/8/1 4:31, Arnaldo Carvalho de Melo wrote:
>>>> Somehow it is not calling what the changeset says it would call when passing
>>>> "-e foo.o", investigating...
>>
>>> Have you tried
>>
>>> /root/bin/perf record -e ./foo.o sleep 1
>>
>>> The key is './'.
>>
>> Nope, trying it now I get:
>>
>> [root@...icio ~]# perf record -e ./foo.o sleep 1
>> libbpf: failed to open ./foo.o: No such file or directory
>> bpf: failed to load ./foo.o
>
> And with a .c suffix:
>
> [root@...icio ~]# perf record -e ./foo.c sleep 1
> clang-3.8: error: no such file or directory: '/root/./foo.c'
> clang-3.8: error: no input files
What's the content of your foo.c? Could you please have a look?
I considered moving .o enabler down so when you see that patch the filter will be
workable. However , like the llvm support, doing so will enable a bulk of code by
one patch, that's not good. Moving .c enabler down is easy.
Now I'm working on a BPF testcase. Tomorrow you will see a new test:
# perf test BPF
It enforces test__llvm, and forks a 'perf record' to do the filtering, then checks the
result using perf report -D. The patch of the new test is a mark which indicates the
basic function of BPF filter is done. What do you think about this idea?
Thank you.
> ERROR: unable to compile ./foo.c
> Hint: Check error message shown above.
> LLVM 3.7 or newer is required. Which can be found from http://llvm.org
> You may want to try git trunk:
> git clone http://llvm.org/git/llvm.git
> and
> git clone http://llvm.org/git/clang.git
>
> Or fetch the latest clang/llvm 3.7 from pre-built llvm packages for
> debian/ubuntu:
> http://llvm.org/apt
>
> If you are using old version of clang, change 'clang-bpf-cmd-template'
> option in [llvm] section of ~/.perfconfig to:
>
> "$CLANG_EXEC $CLANG_OPTIONS $KERNEL_INC_OPTIONS \
> -working-directory $WORKING_DIR -c $CLANG_SOURCE \
> -emit-llvm -o - | /path/to/llc -march=bpf -filetype=obj -o -"
> (Replace /path/to/llc with path to your llc)
>
> Hint: You can also pre-compile it into .o
> invalid or unsupported event: './foo.c'
> Run 'perf list' for a list of valid events
>
> usage: perf record [<options>] [<command>]
> or: perf record [<options>] -- <command> [<options>]
>
> -e, --event <event> event selector. use 'perf list' to list available events
> [root@...icio ~]#
>
> Now to find a hello.c BPF scriptlet...
>
> - Arnaldo
--
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