mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wangnan (F)" <wangnan0@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Andi Kleen <andi@firstfloor.org>, Jiri Olsa <jolsa@kernel.org>,
	<linux-kernel@vger.kernel.org>, Andi Kleen <ak@linux.intel.com>,
	He Kuang <hekuang@huawei.com>, Alexei Starovoitov <ast@fb.com>
Subject: Re: [PATCH 2/2] perf, tools: Don't force MetricExprs to lower case
Date: Fri, 13 Oct 2017 00:07:28 +0800	[thread overview]
Message-ID: <c29e432a-b35c-0c52-71f4-724efbdfe65f@huawei.com> (raw)
In-Reply-To: <20171012155942.GA15716@krava>



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.

  reply	other threads:[~2017-10-12 16:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 19:56 [PATCH 1/2] perf, tools, json: Fix ILP metrics Andi Kleen
2017-09-12 19:56 ` [PATCH 2/2] perf, tools: Don't force MetricExprs to lower case Andi Kleen
2017-10-03 16:06   ` Arnaldo Carvalho de Melo
2017-10-04 10:30     ` Jiri Olsa
2017-10-04 16:27       ` Andi Kleen
2017-10-09 13:41         ` Jiri Olsa
2017-10-09 14:07           ` Andi Kleen
2017-10-09 14:12             ` Arnaldo Carvalho de Melo
2017-10-09 14:39               ` Jiri Olsa
2017-10-09 14:51                 ` Arnaldo Carvalho de Melo
2017-10-09 15:39                 ` Andi Kleen
2017-10-12 15:31                 ` Wangnan (F)
2017-10-12 15:59                   ` Jiri Olsa
2017-10-12 16:07                     ` Wangnan (F) [this message]
2017-10-09 14:43             ` Jiri Olsa
2017-10-09 14:09           ` Arnaldo Carvalho de Melo
2017-10-09 14:41             ` Jiri Olsa
2017-10-12 15:13               ` Jiri Olsa
2017-10-12 21:53                 ` Andi Kleen
2017-10-28 23:10             ` [tip:perf/urgent] perf tools: Unwind properly location after REJECT tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c29e432a-b35c-0c52-71f4-724efbdfe65f@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=ast@fb.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®