diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-07 15:10:19 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-08 15:55:57 -0300 |
commit | 8fa25f303adfed6eab921db8e242e59dd0b3b004 (patch) | |
tree | cc4670e4a020fb26672592760acb888943a7f63c /tools/perf | |
parent | aa31be3a4874d91fb40d872f1865805ab411035c (diff) | |
download | linux-8fa25f303adfed6eab921db8e242e59dd0b3b004.tar.bz2 |
perf bpf: Add wrappers to BPF_FUNC_probe_read(_str) functions
Will be used shortly in the augmented syscalls work together with a
PERF_COUNT_SW_BPF_OUTPUT software event to insert syscalls + pointer
contents in the perf ring buffer, to be consumed by 'perf trace'
beautifiers.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-ajlkpz4cd688ulx1u30htkj3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/include/bpf/bpf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/include/bpf/bpf.h b/tools/perf/include/bpf/bpf.h index 1f632b56bb34..47897d65e799 100644 --- a/tools/perf/include/bpf/bpf.h +++ b/tools/perf/include/bpf/bpf.h @@ -30,4 +30,7 @@ struct bpf_map { char _license[] SEC("license") = #name; \ int _version SEC("version") = LINUX_VERSION_CODE; +static int (*probe_read)(void *dst, int size, const void *unsafe_addr) = (void *)BPF_FUNC_probe_read; +static int (*probe_read_str)(void *dst, int size, const void *unsafe_addr) = (void *)BPF_FUNC_probe_read_str; + #endif /* _PERF_BPF_H */ |