aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/bpf-event.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-09-18 10:36:13 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-20 08:19:22 -0400
commitea49e01cfabd73c94a61649cd04fa524a2beff3c (patch)
tree3f8598c62cf6d33fcabf0561a8a43d49f8acf4c7 /tools/perf/util/bpf-event.h
parentbd23ac11fe9312bab40e129b402757fd7a23dc8e (diff)
perf tools: Move event synthesizing routines to separate header
Those are the only routines using the perf_event__handler_t typedef and are all related, so move to a separate header to reduce the header dependency tree, lots of places were getting event.h and even stdio.h, limits.h indirectly, so fix those as well. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-yvx9u1mf7baq6cu1abfhbqgs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf-event.h')
-rw-r--r--tools/perf/util/bpf-event.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/tools/perf/util/bpf-event.h b/tools/perf/util/bpf-event.h
index a01c2fd68c03..81fdc88e6c1a 100644
--- a/tools/perf/util/bpf-event.h
+++ b/tools/perf/util/bpf-event.h
@@ -6,9 +6,9 @@
6#include <linux/rbtree.h> 6#include <linux/rbtree.h>
7#include <pthread.h> 7#include <pthread.h>
8#include <api/fd/array.h> 8#include <api/fd/array.h>
9#include "event.h"
10#include <stdio.h> 9#include <stdio.h>
11 10
11struct bpf_prog_info;
12struct machine; 12struct machine;
13union perf_event; 13union perf_event;
14struct perf_env; 14struct perf_env;
@@ -33,11 +33,6 @@ struct btf_node {
33#ifdef HAVE_LIBBPF_SUPPORT 33#ifdef HAVE_LIBBPF_SUPPORT
34int machine__process_bpf(struct machine *machine, union perf_event *event, 34int machine__process_bpf(struct machine *machine, union perf_event *event,
35 struct perf_sample *sample); 35 struct perf_sample *sample);
36
37int perf_event__synthesize_bpf_events(struct perf_session *session,
38 perf_event__handler_t process,
39 struct machine *machine,
40 struct record_opts *opts);
41int bpf_event__add_sb_event(struct evlist **evlist, 36int bpf_event__add_sb_event(struct evlist **evlist,
42 struct perf_env *env); 37 struct perf_env *env);
43void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info, 38void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
@@ -51,14 +46,6 @@ static inline int machine__process_bpf(struct machine *machine __maybe_unused,
51 return 0; 46 return 0;
52} 47}
53 48
54static inline int perf_event__synthesize_bpf_events(struct perf_session *session __maybe_unused,
55 perf_event__handler_t process __maybe_unused,
56 struct machine *machine __maybe_unused,
57 struct record_opts *opts __maybe_unused)
58{
59 return 0;
60}
61
62static inline int bpf_event__add_sb_event(struct evlist **evlist __maybe_unused, 49static inline int bpf_event__add_sb_event(struct evlist **evlist __maybe_unused,
63 struct perf_env *env __maybe_unused) 50 struct perf_env *env __maybe_unused)
64{ 51{