diff options
author | Wang Nan <wangnan0@huawei.com> | 2015-11-16 15:10:13 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-11-18 23:51:04 +0300 |
commit | a08357d8dc7d3025d1094f727ad1f7e837766f93 (patch) | |
tree | 9a53b2c350d1fcc8f93512b29ddca4a21846d8d4 /tools/perf/tests/bpf-script-test-prologue.c | |
parent | bfc077b4cf106793b30bf942e426ee99f1f4ac44 (diff) | |
download | linux-a08357d8dc7d3025d1094f727ad1f7e837766f93.tar.xz |
perf bpf: Generate prologue for BPF programs
This patch generates a prologue for each 'struct probe_trace_event' for
fetching arguments for BPF programs.
After bpf__probe(), iterate over each program to check whether prologues are
required. If none of the 'struct perf_probe_event' programs will attach to have
at least one argument, simply skip preprocessor hooking. For those who a
prologue is required, call bpf__gen_prologue() and paste the original
instruction after the prologue.
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-12-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/bpf-script-test-prologue.c')
0 files changed, 0 insertions, 0 deletions