summaryrefslogtreecommitdiff
path: root/tools/perf/util/bpf-loader.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-08-06 09:53:35 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-08 15:55:56 -0300
commit92bbe8d834d293c4db7a70fd53884ec1c95d61dc (patch)
treeafe584cfc5046cf4b01da805d6d5a4c370722bed /tools/perf/util/bpf-loader.h
parent5941d856a90435b32a3296c0b7df8f0075430b81 (diff)
downloadlwn-92bbe8d834d293c4db7a70fd53884ec1c95d61dc.tar.gz
lwn-92bbe8d834d293c4db7a70fd53884ec1c95d61dc.zip
perf bpf: Generalize bpf__setup_stdout()
We will use it to set up other bpf-output events, for instance to generate augmented syscall entry tracepoints with pointer contents. 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-4r7kw0nsyi4vyz6xm1tzx6a3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf-loader.h')
-rw-r--r--tools/perf/util/bpf-loader.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index 5d3aefd6fae7..6be0eec043c6 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -82,6 +82,7 @@ int bpf__apply_obj_config(void);
int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
int bpf__setup_stdout(struct perf_evlist *evlist);
+int bpf__setup_output_event(struct perf_evlist *evlist, const char *name);
int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err,
char *buf, size_t size);
@@ -139,6 +140,12 @@ bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused)
}
static inline int
+bpf__setup_output_event(struct perf_evlist *evlist __maybe_unused, const char *name __maybe_unused)
+{
+ return 0;
+}
+
+static inline int
__bpf_strerror(char *buf, size_t size)
{
if (!size)