[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c29e432a-b35c-0c52-71f4-724efbdfe65f@huawei.com>
Date: Fri, 13 Oct 2017 00:07:28 +0800
From: "Wangnan (F)" <wangnan0@...wei.com>
To: Jiri Olsa <jolsa@...hat.com>
CC: Arnaldo Carvalho de Melo <acme@...nel.org>,
Andi Kleen <andi@...stfloor.org>, Jiri Olsa <jolsa@...nel.org>,
<linux-kernel@...r.kernel.org>, Andi Kleen <ak@...ux.intel.com>,
He Kuang <hekuang@...wei.com>, Alexei Starovoitov <ast@...com>
Subject: Re: [PATCH 2/2] perf, tools: Don't force MetricExprs to lower case
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.
Powered by blists - more mailing lists