From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752286AbdJLQOg (ORCPT ); Thu, 12 Oct 2017 12:14:36 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7992 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbdJLQOf (ORCPT ); Thu, 12 Oct 2017 12:14:35 -0400 Subject: Re: [PATCH 2/2] perf, tools: Don't force MetricExprs to lower case To: Jiri Olsa References: <20170912195643.2611-1-andi@firstfloor.org> <20170912195643.2611-2-andi@firstfloor.org> <20171003160605.GC25388@kernel.org> <20171004103052.GC23759@krava> <20171004162711.GF2482@two.firstfloor.org> <20171009134151.GA15127@krava> <20171009140728.GG2482@two.firstfloor.org> <20171009141258.GE28623@kernel.org> <20171009143953.GA1561@krava> <5d8fc047-1535-5308-91b5-577d8ead1d28@huawei.com> <20171012155942.GA15716@krava> CC: Arnaldo Carvalho de Melo , Andi Kleen , Jiri Olsa , , Andi Kleen , He Kuang , Alexei Starovoitov From: "Wangnan (F)" Message-ID: Date: Fri, 13 Oct 2017 00:07:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171012155942.GA15716@krava> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.194.139] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.59DF934E.0098,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7f1eae2db3b6bad1ef920fc91e240e50 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/10/12 23:59, Jiri Olsa wrote: > On Thu, Oct 12, 2017 at 11:31:51PM +0800, Wangnan (F) wrote: > > SNIP > >>>>> Ok. If it works it's fine for me. >>> well it works, but it means that bpf file cannot contains any directory >>> part.. which im not sure is ok with bpf folks ;-) anyone? >> Sorry I didn't see this thread these days. >> >> Do you think adding a special escape character to suppress BPF >> name parsing in a event is a good idea? for example: >> >> % perf stat -e cpu/uops_executed.core,cmask=1/ true >> bpf: builtin compilation failed: -95, try external compiler >> ERROR: problems with path cpu/uops_executed.c: No such file or directory >> event syntax error: 'cpu/uops_executed.core,cmask=1/' >> \___ Failed to load cpu/uops_executed.c from source: >> Error when compiling BPF scriptlet. Add a leading '@' to avoid BPF syntax >> >> % perf stat -e @cpu/uops_executed.core,cmask=1/ true >> ... >> > if we go this way, I'd rather mark the bpf syntax > instead of changing the generic event format, > like Andi suggested in some earlier email > > but maybe we can workaround this with patch > I sent in my last email Great. I'm also working on a patch which check the existence of BPF file and have it rejected if the file is not exist. The only inconvenient is we need to call stat() many times because bpf_object matchs c[a-zA-Z0-9._]*. I think you have solved the problem in your patch. Thank you.