aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/include/bpf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/include/bpf')
-rw-r--r--tools/perf/include/bpf/bpf.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/include/bpf/bpf.h b/tools/perf/include/bpf/bpf.h
index 2873cdde293f..1f632b56bb34 100644
--- a/tools/perf/include/bpf/bpf.h
+++ b/tools/perf/include/bpf/bpf.h
@@ -4,6 +4,20 @@
#include <uapi/linux/bpf.h>
+/*
+ * A helper structure used by eBPF C program to describe map attributes to
+ * elf_bpf loader, taken from tools/testing/selftests/bpf/bpf_helpers.h:
+ */
+struct bpf_map {
+ unsigned int type;
+ unsigned int key_size;
+ unsigned int value_size;
+ unsigned int max_entries;
+ unsigned int map_flags;
+ unsigned int inner_map_idx;
+ unsigned int numa_node;
+};
+
#define SEC(NAME) __attribute__((section(NAME), used))
#define probe(function, vars) \