[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <564ED621.4050500@huawei.com>
Date: Fri, 20 Nov 2015 16:13:21 +0800
From: "Wangnan (F)" <wangnan0@...wei.com>
To: <acme@...nel.org>, <ast@...mgrid.com>, <brendan.d.gregg@...il.com>
CC: <a.p.zijlstra@...llo.nl>, <daniel@...earbox.net>,
<dsahern@...il.com>, <hekuang@...wei.com>, <jolsa@...nel.org>,
<lizefan@...wei.com>, <masami.hiramatsu.pt@...achi.com>,
<namhyung@...nel.org>, <paulus@...ba.org>,
<linux-kernel@...r.kernel.org>, <pi3orama@....com>,
<xiakaixu@...wei.com>, Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [RFC PATCH 1/7] perf tools: Add API to config maps in bpf object
On 2015/10/17 18:48, Wang Nan wrote:
> bpf__config_obj() is introduced as a core API to config BPF object
> after loading. One configuration option of maps is introduced. After
> this patch BPF object can accept configuration like:
>
> maps.my_map.value=1234
There's an inconvience in this syntax.
In following cmdline:
# perf record -e mybpf.c/maps.channel.value=1234/ ls
because of the greedy manner of flex, mybpf.c/maps.c would
be expressed as path of a BPF source file (and yes, it is a valid
path).
If flex has a non-greedy mode then it would be fixed easily. However,
the official flex docs reveals its policy that it doesn't and would not
provide non-greedy matching. Even if we have non-greedy matching,
we are unable to prohibit user to put their BPF object into path
like
/home/user/mybpf.c/thefile.c
Fortunately this patch has not beed merged, so we have a chance to fix
it at very beginning. I will replace all '.' in object config string
to ':', so the above cmdline becomes:
# perf record -e mybpf.c/maps:channel:value=1234/ ls
[1]
http://flex.sourceforge.net/manual/Why-doesn_0027t-flex-have-non_002dgreedy-operators-like-perl-does_003f.html
--
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