linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Wangnan (F)" <wangnan0@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Brendan Gregg <brendan.d.gregg@gmail.com>, <lizefan@huawei.com>,
	<pi3orama@163.com>, He Kuang <hekuang@huawei.com>
Subject: Re: RFC Re: [PATCH v2 04/13] perf tools: Add API to config maps in bpf object
Date: Sat, 28 Nov 2015 09:21:24 +0800	[thread overview]
Message-ID: <56590194.7030406@huawei.com> (raw)
In-Reply-To: <5659015A.7080901@huawei.com>



On 2015/11/28 9:20, Wangnan (F) wrote:
>
>
> On 2015/11/28 9:10, Arnaldo Carvalho de Melo wrote:
>> Em Fri, Nov 27, 2015 at 08:47:38AM +0000, Wang Nan escreveu:
>>> 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
>>>
>>> (maps.my_map.value looks pretty. However, there's a small but hard
>>> to fixed problem related to flex's greedy matching. Please see [1].
>>> Choose ':' to avoid it in a simpler way.)
>> Understood the issues, but I would like to hear from Ingo, Jiri,
>> Namhyung, Brian and others here, since we're setting up syntax, and yes,
>> using:
>>       maps.my_map.value[0,3...6]=1234;
>>
>> or even:
>>
>>    maps->my_map->value[0,3...6]=1234;
>>
>> Looks more natural than:
>>
>>    maps:my_map:value[0,3...6]=1234;
>
> You don't mention maps::my_map::value. C++ use '::' this way, so I think
> it is also a possible choice.
>
> Or we can use another character for example '|' to replace '/' in case we
> have a map starting with 'c' or 'o'. For example:
>
> ./mybpf.c|maps.channel.value=1234|
>
> and in normal case still support '/':
>
> ./mybpf.c/maps.channel.value=1234/

Should be:

./mybpf.c/maps.mymap.value=1234/

>
> like 'sed':
>
> # sed 's/a/b/g'
> a
> b
> # sed 's+/+|+g'
> /
> |
>
> Thank you.



  reply	other threads:[~2015-11-28  1:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  8:47 [PATCH v2 00/13] perf tools: BPF related update Wang Nan
2015-11-27  8:47 ` [PATCH v2 01/13] bpf tools: Collect map definition in bpf_object Wang Nan
2015-11-29  7:57   ` [tip:perf/core] tools lib bpf: " tip-bot for Wang Nan
2015-11-27  8:47 ` [PATCH v2 02/13] bpf tools: Extract and collect map names from BPF object file Wang Nan
2015-11-29  7:57   ` [tip:perf/core] tools lib bpf: " tip-bot for Wang Nan
2015-11-29 16:14   ` [PATCH v2 02/13] bpf tools: " Namhyung Kim
2015-11-30  5:00     ` Wangnan (F)
2015-11-30  8:51       ` Namhyung Kim
2015-11-30  9:27         ` Wangnan (F)
2015-11-30  9:43           ` Namhyung Kim
2015-11-30  9:48             ` Wangnan (F)
2015-11-30 10:39             ` [PATCH] tools lib bpf: Fetch map names from correct strtab Wang Nan
2015-11-30 11:19               ` Namhyung Kim
2015-11-27  8:47 ` [PATCH v2 03/13] perf tools: Rename bpf config to program config Wang Nan
2015-11-29  7:58   ` [tip:perf/core] perf bpf: " tip-bot for Wang Nan
2015-11-27  8:47 ` [PATCH v2 04/13] perf tools: Add API to config maps in bpf object Wang Nan
2015-11-28  1:10   ` RFC " Arnaldo Carvalho de Melo
2015-11-28  1:20     ` Wangnan (F)
2015-11-28  1:21       ` Wangnan (F) [this message]
2015-11-29 16:21     ` Namhyung Kim
2015-11-27  8:47 ` [PATCH v2 05/13] perf tools: Enable BPF object configure syntax Wang Nan
2015-11-27  8:47 ` [PATCH v2 06/13] perf record: Apply config to BPF objects before recording Wang Nan
2015-11-27  8:47 ` [PATCH v2 07/13] perf tools: Support perf event alias name Wang Nan
2015-11-27  8:47 ` [PATCH v2 08/13] perf tools: Enable passing event to BPF object Wang Nan
2015-11-27  8:47 ` [PATCH v2 09/13] perf tools: Support setting different slots in a BPF map separately Wang Nan
2015-11-27  8:47 ` [PATCH v2 10/13] perf tools: Enable indices setting syntax for BPF maps Wang Nan
2015-11-27  8:47 ` [PATCH v2 11/13] perf tools: Introduce bpf-output event Wang Nan
2015-11-27  8:47 ` [PATCH v2 12/13] perf data: Add u32_hex data type Wang Nan
2015-11-27  8:47 ` [PATCH v2 13/13] perf data: Support converting data from bpf_perf_event_output() Wang Nan

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=56590194.7030406@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ast@kernel.org \
    --cc=brendan.d.gregg@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pi3orama@163.com \
    /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;
as well as URLs for NNTP newsgroup(s).