summaryrefslogtreecommitdiff
path: root/tools/perf/util/bpf-event.h
diff options
context:
space:
mode:
authorSong Liu <songliubraving@fb.com>2019-03-11 22:30:44 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-03-19 16:52:07 -0300
commit3792cb2ff43b1b193136a03ce1336462a827d792 (patch)
tree264a653ee28353181a73b2a226b26769277445a6 /tools/perf/util/bpf-event.h
parent606f972b1361f477cbd4e6e8ac00742fde4b39db (diff)
perf bpf: Save BTF in a rbtree in perf_env
BTF contains information necessary to annotate BPF programs. This patch saves BTF for BPF programs loaded in the system. Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/20190312053051.2690567-9-songliubraving@fb.com 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/bpf-event.h b/tools/perf/util/bpf-event.h
index fad932f7404f..b9ec394dc7c7 100644
--- a/tools/perf/util/bpf-event.h
+++ b/tools/perf/util/bpf-event.h
@@ -16,6 +16,13 @@ struct bpf_prog_info_node {
struct rb_node rb_node;
};
+struct btf_node {
+ struct rb_node rb_node;
+ u32 id;
+ u32 data_size;
+ char data[];
+};
+
#ifdef HAVE_LIBBPF_SUPPORT
int machine__process_bpf_event(struct machine *machine, union perf_event *event,
struct perf_sample *sample);