]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
perf bpf: Add bpf__setup_output_event() strerror() counterpart
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Aug 2018 14:35:37 +0000 (11:35 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 8 Aug 2018 18:55:56 +0000 (15:55 -0300)
That is just bpf__strerror_setup_stdout() renamed to the more general
"setup_output_event" method, keep the existing stdout() as a wrapper.

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-nwnveo428qn0b48axj50vkc7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/bpf-loader.c
tools/perf/util/bpf-loader.h

index 95a27bb6f1a11d1b3a0b2c5907d11fcf7ed7b749..80dead6427196810f379377bdf27a5cbaa715ec0 100644 (file)
@@ -1791,8 +1791,8 @@ int bpf__strerror_apply_obj_config(int err, char *buf, size_t size)
        return 0;
 }
 
-int bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused,
-                              int err, char *buf, size_t size)
+int bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+                                    int err, char *buf, size_t size)
 {
        bpf__strerror_head(err, buf, size);
        bpf__strerror_end(buf, size);
index 6be0eec043c64760b64681fe152bad016d593059..8eca75145ac27b8b122620afd4652570eef9651e 100644 (file)
@@ -83,9 +83,7 @@ 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);
-
+int bpf__strerror_setup_output_event(struct perf_evlist *evlist, int err, char *buf, size_t size);
 #else
 #include <errno.h>
 
@@ -200,11 +198,16 @@ bpf__strerror_apply_obj_config(int err __maybe_unused,
 }
 
 static inline int
-bpf__strerror_setup_stdout(struct perf_evlist *evlist __maybe_unused,
-                          int err __maybe_unused, char *buf,
-                          size_t size)
+bpf__strerror_setup_output_event(struct perf_evlist *evlist __maybe_unused,
+                                int err __maybe_unused, char *buf, size_t size)
 {
        return __bpf_strerror(buf, size);
 }
+
 #endif
+
+static inline int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err, char *buf, size_t size)
+{
+       return bpf__strerror_setup_output_event(evlist, err, buf, size);
+}
 #endif