From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610AbbHCCit (ORCPT ); Sun, 2 Aug 2015 22:38:49 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:10674 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750924AbbHCCis (ORCPT ); Sun, 2 Aug 2015 22:38:48 -0400 Message-ID: <55BED407.9090009@huawei.com> Date: Mon, 3 Aug 2015 10:37:59 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo CC: He Kuang , Li Zefan , , , , , Ingo Molnar , Jiri Olsa , David Ahern , Namhyung Kim Subject: Re: perf eBPF patch ordering. was: Re: perf test LLVM was: Re: [GIT PULL 00/39] perf tools: filtering events using eBPF programs References: <1436445342-1402-1-git-send-email-wangnan0@huawei.com> <20150714153657.GL2885@kernel.org> <55A63AC4.6040701@huawei.com> <20150715112015.GA3868@kernel.org> <55A869A1.505@huawei.com> <55AE2858.6040409@huawei.com> <20150721114151.GF5368@kernel.org> <55AF1EA5.5020500@huawei.com> <20150731153522.GA16700@kernel.org> <20150731203125.GB16700@kernel.org> In-Reply-To: <20150731203125.GB16700@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.55BED422.006E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: bd70f9822268f25dac79af180fc25c50 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/8/1 4:31, Arnaldo Carvalho de Melo wrote: > Em Fri, Jul 31, 2015 at 12:35:22PM -0300, Arnaldo Carvalho de Melo escreveu: >> But point here is, when I see "enable passing >> bpf object file to --event" I apply the patch and expect to be able to >> go straight away and do: > >> perf record -e foo.o sleep 1 > >> And get some informative message as to hey, yes, I managed to do what >> you asked or something is wrong, but I get: > >> [root@felicio ~]# perf record --event foo.o sleep >> event syntax error: 'foo.o' >> \___ parser error >> Run 'perf list' for a list of valid events > >> usage: perf record [] [] >> or: perf record [] -- [] > >> -e, --event event selector. use 'perf list' to list available events >> [root@felicio ~]# > >> So, is it enabled or is it not? Doesn't look like. I.e. I think the best >> thing is to only expose this when it can be used. Till that time, we can > I just tried gdb'ing this with a breakpoint on parse_events_load_bpf(), > but when I run: > > (gdb) b parse_events_load_bpf > Breakpoint 1 at 0x48b11b: file util/parse-events.c, line 488. > (gdb) run record -e foo.o sleep 1 > Starting program: /root/bin/perf record -e foo.o sleep 1 > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > event syntax error: 'foo.o' > \___ parser error > Run 'perf list' for a list of valid events > > 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 './'. I have reproduced the problem. Haven't noticed that because I always use './' name. Will look into it. Thank you, and glad to see you start looking at this cset. > - Arnaldo