[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-ajlkpz4cd688ulx1u30htkj3@git.kernel.org>
Date: Sat, 18 Aug 2018 04:39:13 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dsahern@...il.com, adrian.hunter@...el.com, tglx@...utronix.de,
jolsa@...nel.org, mingo@...nel.org, namhyung@...nel.org,
linux-kernel@...r.kernel.org, wangnan0@...wei.com, acme@...hat.com,
hpa@...or.com
Subject: [tip:perf/urgent] perf bpf: Add wrappers to
BPF_FUNC_probe_read(_str) functions
Commit-ID: 8fa25f303adfed6eab921db8e242e59dd0b3b004
Gitweb: https://git.kernel.org/tip/8fa25f303adfed6eab921db8e242e59dd0b3b004
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 7 Aug 2018 15:10:19 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 8 Aug 2018 15:55:57 -0300
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@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: https://lkml.kernel.org/n/tip-ajlkpz4cd688ulx1u30htkj3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/include/bpf/bpf.h | 3 +++
1 file changed, 3 insertions(+)
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 */
Powered by blists - more mailing lists