perf bpf: Allow BPF program attach to uprobe events
authorWang Nan <wangnan0@huawei.com>
Mon, 16 Nov 2015 12:10:05 +0000 (12:10 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 18 Nov 2015 20:51:03 +0000 (17:51 -0300)
commit361f2b1d1d7231b8685d990b886f599378a4d5a5
tree00a5bce805e0470aaa27300b4cb72f6f0dfa1f29
parent30433a3a52b951faab95944e0f8b9d33a1e322ce
perf bpf: Allow BPF program attach to uprobe events

This patch adds a new syntax to the BPF object section name to support
probing at uprobe event. Now we can use BPF program like this:

  SEC(
  "exec=/lib64/libc.so.6;"
  "libcwrite=__write"
  )
  int libcwrite(void *ctx)
  {
      return 1;
  }

Where, in section name of a program, before the main config string, we
can use 'key=value' style options. Now the only option key is "exec",
for uprobes.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1447675815-166222-4-git-send-email-wangnan0@huawei.com
[ Changed the separator from \n to ; ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/bpf-loader.c
tools/perf/util/bpf-loader.h