Messages in this thread | | | Date | Wed, 16 Dec 2015 12:24:56 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH v5 10/14] perf tools: Enable indices setting syntax for BPF maps |
| |
On Mon, Dec 14, 2015 at 10:39:19AM +0000, Wang Nan wrote:
SNIP
> # cat /sys/kernel/debug/tracing/trace | grep usleep > usleep-405 [004] d... 2745423.547822: : 101 > usleep-655 [006] d... 2745434.122814: : 102 > usleep-904 [006] d... 2745439.916264: : 103 > # ./perf record -e './test_bpf_map_3.c/maps:channel.value[all]=104/' usleep 99 > # cat /sys/kernel/debug/tracing/trace | grep usleep > usleep-405 [004] d... 2745423.547822: : 101 > usleep-655 [006] d... 2745434.122814: : 102 > usleep-904 [006] d... 2745439.916264: : 103 > usleep-1537 [003] d... 2745538.053737: : 104 > > Error case: > # ./perf record -e './test_bpf_map_3.c/maps:channel.value[10...1000]=104/' usleep 99 > event syntax error: '..annel.value[10...1000]=104/' > \___ Index too large > Hint: Valid config terms: > maps:[<arraymap>].value<indices>=[value] > maps:[<eventmap>].event<indices>=[event] > > where <indices> is something like [0,3...5] or [all] > (add -v to see detail) > Run 'perf list' for a list of valid events > > Usage: perf record [<options>] [<command>] > or: perf record [<options>] -- <command> [<options>] > > -e, --event <event> event selector. use 'perf list' to list available events > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Alexei Starovoitov <ast@kernel.org> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> > Cc: Namhyung Kim <namhyung@kernel.org> > Cc: Zefan Li <lizefan@huawei.com> > Cc: pi3orama@163.com > --- > tools/perf/util/parse-events.c | 5 ++- > tools/perf/util/parse-events.l | 13 ++++++- > tools/perf/util/parse-events.y | 85 ++++++++++++++++++++++++++++++++++++++++++
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks, jirka
| |