perf trace: Call bpf__apply_obj_config in 'perf trace'
authorWang Nan <wangnan0@huawei.com>
Fri, 26 Feb 2016 09:31:54 +0000 (09:31 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Feb 2016 22:50:40 +0000 (19:50 -0300)
commitba50423530200659d4deb703a8f72d3b69bc13ce
tree2de54b3feb823113ad9b4acec0ebac41fa7c4071
parentfdf14720fbd02d406ac2c1c50444774b4c7eed9a
perf trace: Call bpf__apply_obj_config in 'perf trace'

Without this patch BPF map configuration is not applied.

Command like this:
 # ./perf trace --ev bpf-output/no-inherit,name=evt/ \
                --ev ./test_bpf_trace.c/map:channel.event=evt/ \
                usleep 100000

Load BPF files without error, but since map:channel.event=evt is not
applied, bpf-output event not work.

This patch allows 'perf trace' load and run BPF scripts.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1456479154-136027-7-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c